postDelete() public method

Empty template method to provide concrete Record classes with the possibility to hook into the deletion procedure.
public postDelete ( $event )
Esempio n. 1
0
 public function postDelete($event)
 {
     parent::postDelete($event);
     if ($this->tipo == 'documento') {
         unlink('uploads/documentos/' . $this->filename);
         unlink('uploads/documentos/' . preg_replace('/\\.pdf$/', '.copia.pdf', $this->filename));
     } else {
         if ($this->tipo == 'dato') {
             unlink('uploads/datos/' . $this->filename);
         }
     }
 }
Esempio n. 2
0
 /**
  * Invokes postDelete event listeners.
  */
 private function _postDelete(Doctrine_Record $record)
 {
     $event = new Doctrine_Event($record, Doctrine_Event::RECORD_DELETE);
     $record->postDelete($event);
     $record->getTable()->getRecordListener()->postDelete($event);
 }
 /**
  * Postdelete hook for transactional activity logging.
  *
  * @param Doctrine_Event $event
  */
 public function postDelete($event)
 {
     AIR2Logger::log($this, 'delete');
     parent::postDelete($event);
 }