예제 #1
0
 /** {@inheritDoc} */
 public function afterRemove()
 {
     /* удаляем event */
     if (!$this->modx->getCount($this->classKey, array('event' => $this->object->get('event')))) {
         $this->MlmSystem->setPluginEvent($this->object->get('event'), 'remove');
     }
     return true;
 }
예제 #2
0
 /** {@inheritDoc} */
 public function afterSave()
 {
     /* удаляем старый event */
     if ($this->object->get('event') != $this->event and !$this->modx->getCount($this->classKey, array('event' => $this->event))) {
         $this->MlmSystem->setPluginEvent($this->event, 'remove');
     }
     if ($this->object->get('active')) {
         $this->MlmSystem->setPluginEvent($this->object->get('event'), 'create');
     } elseif (!$this->modx->getCount($this->classKey, array('event' => $this->object->get('event'), 'active' => 1))) {
         $this->MlmSystem->setPluginEvent($this->object->get('event'), 'remove');
     }
     return true;
 }
예제 #3
0
 /** {@inheritDoc} */
 public function afterSave()
 {
     $this->MlmSystem->setPluginEvent($this->object->get('event'), 'create');
     return true;
 }