public function set($field, $value) { if ($field == 'title' && empty($value)) { return $this->delete(); } return parent::set($field, $value); }
/** * For annotations, the artefact.mtime property is displayed to users, as the "Update on" date, * if it is later than the artefact's creation time. The purpose of this is for transparency * in communication, so that people will know that a later feedback may be in response to one * that no longer exists. * * @see ArtefactType::set() */ public function set($field, $value) { if (($field == 'title' || $field == 'description') && $this->{$field} != $value) { $this->lastcontentupdate = $this->mtime; } return parent::set($field, $value); }