public function afterSave() { /* выполняем уведомления */ if ($this->object->get('status') != $this->status) { $this->MlmSystem->Tools->sendNotice($this->object); } /* генерируем пути */ if ($this->object->get('parent') != $this->parent) { $this->MlmSystem->Paths->removePathItem($this->object->get('id')); $this->MlmSystem->Paths->GeneratePaths($this->object->get('id')); } return parent::afterSave(); }
/** @inheritdoc} */ public function checkClientParent(MlmSystemClient $client, $parent = 0) { if (!$this->MlmSystem->Paths) { $this->MlmSystem->loadPaths(); } return $this->MlmSystem->Paths->checkParent($client->get('id'), $parent); }