protected function beforeSave() { if (parent::beforeSave()) { if (array_key_exists('startDateTime', $this->originalAttributeValues) && $this->startDateTime != null) { $this->unrestrictedSet('latestDateTime', $this->startDateTime); } return true; } else { return false; } }
protected function beforeSave() { if (parent::beforeSave()) { if (array_key_exists('completed', $this->originalAttributeValues) && $this->completed == true) { if ($this->completedDateTime == null) { $this->completedDateTime = DateTimeUtil::convertTimestampToDbFormatDateTime(time()); } $this->unrestrictedSet('latestDateTime', $this->completedDateTime); } return true; } else { return false; } }
protected function afterSave() { if ($this->getScenario() != 'importModel') { $this->processNotificationsToBeSent(); } if ($this->getScenario() != 'kanbanViewButtonClick' && $this->getScenario() != 'kanbanViewDrag') { TasksUtil::checkKanbanTypeByStatusAndUpdateIfRequired($this); } parent::afterSave(); }