예제 #1
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $ret[] = array('class' => $this->_class, 'event' => 'Kwf_Component_Event_Component_Added', 'callback' => 'onComponentAdded');
     $ret[] = array('class' => $this->_class, 'event' => 'Kwf_Component_Event_Component_Removed', 'callback' => 'onComponentRemoved');
     return $ret;
 }
예제 #2
0
 private static function _getSubscribersFromComponent($componentClass)
 {
     $subscribers = array();
     $eventsClass = Kwc_Admin::getComponentClass($componentClass, 'Events');
     $subscribers[] = Kwf_Component_Abstract_Events::getInstance($eventsClass, array('componentClass' => $componentClass));
     foreach (Kwc_Abstract::getSetting($componentClass, 'generators') as $generatorKey => $null) {
         $generator = current(Kwf_Component_Generator_Abstract::getInstances($componentClass, array('generator' => $generatorKey)));
         $eventsClass = $generator->getEventsClass();
         if ($eventsClass) {
             $subscribers[] = Kwf_Component_Generator_Events::getInstance($eventsClass, array('componentClass' => $componentClass, 'generatorKey' => $generatorKey));
         }
     }
     if (Kwc_Abstract::hasSetting($componentClass, 'menuConfig')) {
         $mc = Kwf_Component_Abstract_MenuConfig_Abstract::getInstance($componentClass);
         $eventsClass = $mc->getEventsClass();
         if ($eventsClass) {
             $subscribers[] = Kwf_Component_Abstract_MenuConfig_Events::getInstance($eventsClass, array('componentClass' => $componentClass));
         }
     }
     return $subscribers;
 }
예제 #3
0
 protected function _getClassFromRowFromGenerator($row, $cleanValue = false)
 {
     $classes = $this->_getGenerator()->getChildComponentClasses();
     return parent::_getClassFromRow($classes, $row, $cleanValue);
 }