示例#1
0
 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;
     }
 }
示例#2
0
文件: Task.php 项目: youprofit/Zurmo
 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;
     }
 }
示例#3
0
 /**
  * @return bool
  */
 protected function beforeSave()
 {
     if (parent::beforeSave()) {
         $this->resolveAndSetDefaultSubscribers();
         return true;
     } else {
         return false;
     }
 }