Exemplo n.º 1
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $masterComponentClass = Kwc_Abstract::getSetting($this->_class, 'masterComponentClass');
     $ret[] = array('class' => $masterComponentClass, 'event' => 'Kwf_Component_Event_Component_RowUpdated', 'callback' => 'onGeneratorRowUpdate');
     return $ret;
 }
Exemplo 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;
 }
Exemplo n.º 3
0
 public function onMasterContentChanged(Kwf_Component_Event_Component_ContentChanged $event)
 {
     parent::onMasterContentChanged($event);
     $components = Kwc_Chained_Abstract_Component::getAllChainedByMaster($event->component, 'Trl');
     foreach ($components as $component) {
         $this->fireEvent(new Kwf_Component_Event_Component_ContentChanged($component->componentClass, $component));
     }
 }
Exemplo n.º 4
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     foreach (Kwc_Abstract::getChildComponentClasses($this->_class, 'child') as $class) {
         $ret[] = array('class' => $class, 'event' => 'Kwf_Component_Event_Component_HasContentChanged', 'callback' => 'onChildHasContentChange');
     }
     return $ret;
 }
Exemplo n.º 5
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     foreach ($this->_getCreatingClasses($this->_class) as $c) {
         if (is_instance_of($c, 'Kwc_Basic_LinkTag_Trl_Component')) {
             $ret[] = array('class' => $c, 'event' => 'Kwf_Component_Event_Component_ContentChanged', 'callback' => 'onLinkTagContentChanged');
         }
     }
     return $ret;
 }
Exemplo n.º 6
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $ret[] = array('class' => null, 'event' => 'Kwf_Component_Event_Page_RecursiveUrlChanged', 'callback' => 'onRecursiveUrlChanged');
     $ret[] = array('class' => null, 'event' => 'Kwf_Component_Event_Component_RecursiveRemoved', 'callback' => 'onRecursiveRemovedAdded');
     $ret[] = array('class' => null, 'event' => 'Kwf_Component_Event_Component_RecursiveAdded', 'callback' => 'onRecursiveRemovedAdded');
     $ret[] = array('class' => null, 'event' => 'Kwf_Component_Event_Page_Added', 'callback' => 'onPageRemovedAdded');
     $ret[] = array('class' => null, 'event' => 'Kwf_Component_Event_Page_Removed', 'callback' => 'onPageRemovedAdded');
     return $ret;
 }
Exemplo n.º 7
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $m = Kwc_Abstract::createChildModel($this->_class);
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onRowUpdate');
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Inserted', 'callback' => 'onRowUpdate');
     $masterComponentClass = Kwc_Abstract::getSetting($this->_class, 'masterComponentClass');
     $m = Kwc_Abstract::createChildModel($masterComponentClass);
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onMasterRowUpdate');
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Deleted', 'callback' => 'onMasterRowDelete');
     return $ret;
 }
Exemplo n.º 8
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     $cls = strpos($this->_class, '.') ? substr($this->_class, 0, strpos($this->_class, '.')) : $this->_class;
     $m = call_user_func(array($cls, 'createChildModel'), $this->_class);
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onRowUpdate');
     $masterComponentClass = Kwc_Abstract::getSetting($this->_class, 'masterComponentClass');
     $cls = strpos($masterComponentClass, '.') ? substr($masterComponentClass, 0, strpos($masterComponentClass, '.')) : $masterComponentClass;
     $m = call_user_func(array($cls, 'createChildModel'), $masterComponentClass);
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onMasterRowUpdate');
     $ret[] = array('class' => $m, 'event' => 'Kwf_Events_Event_Row_Deleted', 'callback' => 'onMasterRowDelete');
     return $ret;
 }
Exemplo n.º 9
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     foreach (Kwc_Abstract::getComponentClasses() as $class) {
         if (is_instance_of($class, 'Kwc_Basic_ImageEnlarge_Trl_Component') && $this->_canCreateUsIndirectly($class)) {
             $imageClass = Kwc_Abstract::getChildComponentClass($class, 'image');
             $ret[] = array('class' => $imageClass, 'event' => 'Kwc_Abstract_Image_ImageChangedEvent', 'callback' => 'onImageChanged');
             $ret[] = array('class' => $imageClass, 'event' => 'Kwf_Component_Event_ComponentClass_ContentChanged', 'callback' => 'onClassContentChanged');
             $masterComponentClass = Kwc_Abstract::getSetting($class, 'masterComponentClass');
             $ret[] = array('class' => $masterComponentClass, 'event' => 'Kwc_Abstract_Image_ImageChangedEvent', 'callback' => 'onMasterImageChanged');
             $ret[] = array('class' => $masterComponentClass, 'event' => 'Kwf_Component_Event_ComponentClass_ContentChanged', 'callback' => 'onClassContentChanged');
             $ret[] = array('class' => $class, 'event' => 'Kwf_Component_Event_Component_ContentChanged', 'callback' => 'onImageContentChanged');
             $ret[] = array('class' => $class, 'event' => 'Kwf_Component_Event_ComponentClass_ContentChanged', 'callback' => 'onClassContentChanged');
         }
     }
     return $ret;
 }
Exemplo n.º 10
0
 public function getListeners()
 {
     $ret = parent::getListeners();
     // master model
     $masterComponentClass = Kwc_Abstract::getSetting($this->_class, 'masterComponentClass');
     $ret[] = array('class' => $masterComponentClass, 'event' => 'Kwc_Directories_List_EventItemUpdated', 'callback' => 'onMasterChildRowUpdate');
     $ret[] = array('class' => $masterComponentClass, 'event' => 'Kwc_Directories_List_EventItemInserted', 'callback' => 'onMasterChildRowInsert');
     $ret[] = array('class' => $masterComponentClass, 'event' => 'Kwc_Directories_List_EventItemDeleted', 'callback' => 'onMasterChildRowDelete');
     $ret[] = array('class' => $masterComponentClass, 'event' => 'Kwc_Directories_List_EventItemsUpdated', 'callback' => 'onMasterChildModelUpdated');
     // trl model (optional)
     $generator = Kwf_Component_Generator_Abstract::getInstance($this->_class, 'detail');
     if ($generator->getModel()) {
         $ret[] = array('class' => get_class($generator->getModel()), 'event' => 'Kwf_Events_Event_Row_Updated', 'callback' => 'onChildRowUpdate');
         $ret[] = array('class' => get_class($generator->getModel()), 'event' => 'Kwf_Events_Event_Row_Inserted', 'callback' => 'onChildRowInsert');
         $ret[] = array('class' => get_class($generator->getModel()), 'event' => 'Kwf_Events_Event_Row_Deleted', 'callback' => 'onChildRowDelete');
         $ret[] = array('class' => get_class($generator->getModel()), 'event' => 'Kwf_Events_Event_Model_Updated', 'callback' => 'onChildModelUpdated');
     }
     return $ret;
 }