Пример #1
0
 /**
  * Override this to make changes just before the model is committed to the repository during a save operation
  */
 protected function beforeSave()
 {
     if ($this->isNewRecord()) {
         $this->PostedAt = new \DateTime();
     }
     parent::beforeSave();
 }
Пример #2
0
 protected function beforeSave()
 {
     parent::beforeSave();
     if ($this->isNewRecord()) {
         $this->DatePosted = new \DateTime();
     }
 }
 protected function beforeSave()
 {
     if ($this->isNewRecord()) {
         $this->DateCreated = "now";
     }
     parent::beforeSave();
 }
 protected function beforeSave()
 {
     if ($this->isNewRecord()) {
         $this->DateCreated = new RhubarbDateTime("now");
     }
     parent::beforeSave();
 }
Пример #5
0
 protected function beforeSave()
 {
     $this->LastUpdatedBy = new \DateTime();
     if ($this->isNewRecord()) {
         $this->UploadedAt = new \DateTime();
     }
     parent::beforeSave();
 }
Пример #6
0
 protected function beforeSave()
 {
     if ($this->isNewRecord()) {
         $this->CreatedAt = new DateTime('now');
         $this->CreatedBy = CustomLoginProvider::getLoggedInUser()->UniqueIdentifier;
     }
     parent::beforeSave();
 }