Example #1
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $factoryId = $this->_getModel()->getProxyModel()->getFactoryId();
     $ret[] = array('class' => $factoryId, 'event' => 'Kwf_Events_Event_Row_Deleted', 'callback' => 'onRowEvent');
     $ret[] = array('class' => $factoryId, 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onRowEvent');
     $ret[] = array('class' => $factoryId, 'event' => 'Kwf_Events_Event_Model_Updated', 'callback' => 'onModelEvent');
     return $ret;
 }
Example #2
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     foreach ($this->_getModel()->getUnionModels() as $k => $sourceModel) {
         $sourceModelId = $sourceModel->getFactoryId();
         $ret[] = array('class' => $sourceModelId, 'event' => 'Kwf_Events_Event_Row_Inserted', 'callback' => 'onRowEvent');
         $ret[] = array('class' => $sourceModelId, 'event' => 'Kwf_Events_Event_Row_Deleted', 'callback' => 'onRowEvent');
         $ret[] = array('class' => $sourceModelId, 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onRowEvent');
         $ret[] = array('class' => $sourceModelId, 'event' => 'Kwf_Events_Event_Model_Updated', 'callback' => 'onModelEvent');
     }
     return $ret;
 }
 public function getEventSubscribers()
 {
     $ret = array();
     foreach ($this->_models as $m) {
         $ret = array_merge($ret, $m->getEventSubscribers());
     }
     $ret[] = Kwf_Model_EventSubscriber::getInstance('Kwf_Model_Union_Events', array('modelFactoryConfig' => $this->getFactoryConfig()));
     return $ret;
 }
Example #4
0
 public function getEventSubscribers()
 {
     $ret = parent::getEventSubscribers();
     $ret[] = Kwf_Model_EventSubscriber::getInstance('Kwf_Model_Events_Basic_EventSubscriber', array('modelFactoryConfig' => $this->getFactoryConfig()));
     return $ret;
 }
 public function getListeners()
 {
     $ret = parent::getListeners();
     $ret[] = array('class' => null, 'event' => 'Kwf_Model_Events_Basic_TestEvent', 'callback' => 'onTestEvent');
     return $ret;
 }
Example #6
0
 public function getEventSubscribers()
 {
     $ret = $this->getProxyModel()->getEventSubscribers();
     $fc = $this->getFactoryConfig();
     if (!$fc) {
         throw new Kwf_Exception("Didn't find factoryConfig for '" . get_class($this) . "'");
     }
     $ret[] = Kwf_Model_EventSubscriber::getInstance('Kwf_Model_Proxy_Events', array('modelFactoryConfig' => $fc));
     return $ret;
 }