protected function beforeCreate()
 {
     $this->setIp(IP);
     $this->setTs(NOW);
     $this->setAgent(USER_AGENT);
     parent::beforeCreate();
 }
Пример #2
0
 public function deleteObject()
 {
     // Remove file itself
     if (file_exists(DIR_BASE . $this->getImage())) {
         unlink(DIR_BASE . $this->getImage());
     }
     parent::deleteObject();
 }
Пример #3
0
 public function deleteObject()
 {
     // Remove file itself
     $path = $this->getPath();
     if (file_exists(DIR_BASE . $path)) {
         unlink(DIR_BASE . $path);
     }
     parent::deleteObject();
 }
Пример #4
0
 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();
 }
Пример #5
0
 protected function beforeSave()
 {
     $this->setTs(NOW);
     parent::beforeSave();
 }
Пример #6
0
 public function beforeCreate()
 {
     $this->setField('date_created', NOW);
     $this->setField('ip', IP);
     parent::beforeCreate();
 }