protected function beforeCreate() { $this->setIp(IP); $this->setTs(NOW); $this->setAgent(USER_AGENT); parent::beforeCreate(); }
public function deleteObject() { // Remove file itself if (file_exists(DIR_BASE . $this->getImage())) { unlink(DIR_BASE . $this->getImage()); } parent::deleteObject(); }
public function deleteObject() { // Remove file itself $path = $this->getPath(); if (file_exists(DIR_BASE . $path)) { unlink(DIR_BASE . $path); } parent::deleteObject(); }
protected function beforeDelete() { $disabled = new PageComponentsDisabledEntityRepository(); $disabled->setWherePageId($this->getId()); $disabled->deleteObjectCollection(); $history = new PageComponentHistoryRepository(); $history->setWherePageId($this->getId()); $history->deleteObjectCollection(); $components = new PageComponentRepository(); $components->setWherePageId($this->getId()); $components->deleteObjectCollection(); $clickmap = new PageClickmapRepository(); $clickmap->setWherePageId($this->getId()); $clickmap->deleteObjectCollection(); parent::beforeDelete(); }
protected function beforeSave() { $this->setTs(NOW); parent::beforeSave(); }
public function beforeCreate() { $this->setField('date_created', NOW); $this->setField('ip', IP); parent::beforeCreate(); }