/** * @inheritdoc */ protected function getValue($event) { if ($this->value === null) { return new Expression('CURRENT_TIMESTAMP'); } return parent::getValue($event); }
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); } }