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; } }
/** * @return bool */ protected function beforeSave() { if (parent::beforeSave()) { $this->resolveAndSetDefaultSubscribers(); return true; } else { return false; } }