Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 protected function getValue($event)
 {
     if ($this->value === null) {
         return new Expression('CURRENT_TIMESTAMP');
     }
     return parent::getValue($event);
 }
Ejemplo n.º 2
0
 protected function getValue($event)
 {
     if ($this->onChange) {
         if ($this->owner->isAttributeChanged($this->onChange)) {
             return parent::getValue($event);
         } else {
             return $this->owner->{$this->attributes[$event->name][0]};
         }
     } else {
         return parent::getValue($event);
     }
 }