Ejemplo n.º 1
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $ret[] = array('event' => 'Kwf_Component_Event_Component_ContentWidthChanged', 'callback' => 'onContentWidthChanged');
     $ret[] = array('event' => 'Kwf_Component_Event_Component_RecursiveContentWidthChanged', 'callback' => 'onRecursiveContentWidthChanged');
     return $ret;
 }
Ejemplo n.º 2
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $ret[] = array('class' => $this->_class, 'event' => 'Kwf_Component_Event_Component_RowUpdated', 'callback' => 'onGeneratorRowUpdate');
     $ret[] = array('class' => $this->_class, 'event' => 'Kwf_Component_Event_Component_ModelUpdated', 'callback' => 'onGeneratorModelUpdate');
     return $ret;
 }
Ejemplo n.º 3
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $ret[] = array('event' => 'Kwf_Component_Event_Page_UrlChanged', 'callback' => 'onUrlChanged');
     $ret[] = array('event' => 'Kwf_Component_Event_Page_RecursiveUrlChanged', 'callback' => 'onRecursiveUrlChanged');
     return $ret;
 }
Ejemplo n.º 4
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $m = Kwc_Abstract::createChildModel($this->_class);
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onChildRowUpdate');
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Deleted', 'callback' => 'onChildRowUpdate');
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Inserted', 'callback' => 'onChildRowUpdate');
     return $ret;
 }
Ejemplo n.º 5
0
 protected function _onOwnRowUpdate(Kwf_Component_Data $c, Kwf_Events_Event_Row_Abstract $event)
 {
     parent::_onOwnRowUpdate($c, $event);
     if ($event->isDirty('component')) {
         $generators = Kwc_Abstract::getSetting($this->_class, 'generators');
         $classes = $generators['child']['component'];
         $this->fireEvent(new Kwf_Component_Event_Component_RecursiveRemoved($this->_getClassFromRow($classes, $event->row, true), $c));
         $this->fireEvent(new Kwf_Component_Event_Component_RecursiveAdded($this->_getClassFromRow($classes, $event->row, false), $c));
         $this->fireEvent(new Kwf_Component_Event_Component_HasContentChanged($this->_class, $c));
     }
 }
Ejemplo n.º 6
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     foreach (call_user_func(array($this->_class, 'getItemDirectoryClasses'), $this->_class) as $dirCls) {
         $ret[] = array('class' => $dirCls, 'event' => 'Kwc_Directories_List_EventItemUpdated', 'callback' => 'onArticleChanged');
     }
     $modelName = Kwc_Abstract::getSetting(Kwc_Abstract::getSetting($this->_class, 'categoryComponentClass'), 'categoryToItemModelName');
     $ret[] = array('class' => $modelName, 'event' => 'Kwf_Events_Event_Row_Inserted', 'callback' => 'onCategoryChanged');
     $ret[] = array('class' => $modelName, 'event' => 'Kwf_Events_Event_Row_Deleted', 'callback' => 'onCategoryChanged');
     $ret[] = array('class' => $modelName, 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onCategoryUpdated');
     return $ret;
 }
Ejemplo n.º 7
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     foreach (Kwc_Abstract::getComponentClasses() as $class) {
         if (is_instance_of($class, 'Kwc_Directories_Category_Directory_Component') && $this->_canCreateUsIndirectly($class)) {
             $childReference = Kwc_Abstract::hasSetting($class, 'childReferenceName') ? Kwc_Abstract::getSetting($class, 'childReferenceName') : 'Categories';
             foreach (call_user_func(array($this->_class, 'getItemDirectoryClasses'), $this->_class) as $dirCls) {
                 $dirModel = Kwc_Abstract::createChildModel($dirCls);
                 $relModel = $dirModel->getDependentModel($childReference);
                 $ret[] = array('class' => $relModel, 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onUpdateRow');
                 $ret[] = array('class' => $relModel, 'event' => 'Kwf_Events_Event_Row_Inserted', 'callback' => 'onUpdateRow');
                 $ret[] = array('class' => $relModel, 'event' => 'Kwf_Events_Event_Row_Deleted', 'callback' => 'onUpdateRow');
             }
         }
     }
     return $ret;
 }
Ejemplo n.º 8
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $ret[] = array('class' => 'Kwf_Component_Cache_Composite_Root_Component', 'event' => 'Kwf_Component_Event_Component_HasContentChanged', 'callback' => 'onHasContentChange');
     return $ret;
 }