Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagephp
titleExample Observer
<?php

/**
 * Class TNW_Salesforce_Model_Observer
 */
class TNW_Salesforce_Model_Observer
{
 
    public function opportunityProcess(Varien_Event_Observer $observer) {
		/** 
		 * @var array $_order_ids
		 * 
		 * Example:
		 *   array (size=1)
		 *     0 => string '189' (length=3)
		 */
		$_order_ids = $observer->getData('orderIds');
 
		/** 
		 * @var string $_message
		 * 
		 * Example:
		 *   string 'Total of 1 record(s) were successfully synchronized'
		 */
		$_message = $observer->getData('message');

		/** 
		 * @var string $_message
		 * 
		 * Example
		 *   string 'salesforce'
		 */
		$_type = $observer->getData('type');

		/** @var string $_object_type */
		$_object_type = $observer->getData('object_type');

		/** @var bool $_is_queue */
		$_is_queue = $observer->getData('isQueue');

		/** @var array $_queue_ids */
		$_queue_ids = $observer->getData('queueIds');

		// Your custom code
    }
 
}

...