Exemplo n.º 1
0
 /**
  * StorableTrait > preUpdate(): Called automatically before updating the object to source.
  * @param array $properties The properties (ident) set for update.
  * @return boolean
  */
 public function preUpdate(array $properties = null)
 {
     parent::preUpdate($properties);
     $this->setLastModified('now');
     return true;
 }
Exemplo n.º 2
0
 /**
  * Event called before _updating_ the object.
  *
  * @see    Charcoal\Source\StorableTrait::preUpdate() For the "update" Event.
  * @param  array $properties Optional. The list of properties to update.
  * @return boolean
  */
 public function preUpdate(array $properties = null)
 {
     $this->setCreationDate('now');
     $this->setLastModificationDate('now');
     return parent::preUpdate($properties);
 }