Esempio n. 1
0
 public function onMasterRowUpdate(Kwf_Events_Event_Row_Abstract $event)
 {
     parent::onMasterRowUpdate($event);
     if ($event->isDirty('visible')) {
         //trl doesn't have own visible, master visible is used
         $chainedType = 'Trl';
         foreach (Kwf_Component_Data_Root::getInstance()->getComponentsByDbId($event->row->component_id) as $c) {
             $chained = Kwc_Chained_Abstract_Component::getAllChainedByMaster($c, $chainedType);
             foreach ($chained as $c) {
                 $this->fireEvent(new Kwf_Component_Event_Component_ContentChanged($this->_class, $c));
             }
         }
     }
 }
Esempio n. 2
0
 public function onRowUpdate(Kwf_Events_Event_Row_Updated $event)
 {
     parent::onRowUpdate($event);
     if ($event->isDirty('title')) {
         //component_id is the child component id, not as in master the list component id
         $cmps = Kwf_Component_Data_Root::getInstance()->getComponentsByDbId($event->row->component_id, array('ignoreVisible' => true));
         foreach ($cmps as $c) {
             $c = $c->parent;
             if ($c->componentClass == $this->_class) {
                 $this->fireEvent(new Kwf_Component_Event_Component_ContentChanged($this->_class, $c));
             }
         }
     }
 }