示例#1
0
 /**
  * Delete this entity
  * @todo complete this
  * @return bool
  */
 function delete()
 {
     $event = new \Idno\Core\Event(array('object' => $this));
     $event->setResponse(true);
     if (\Idno\Core\Idno::site()->triggerEvent('delete', array('object' => $this))) {
         $this->unsyndicate();
         if ($entries = \Idno\Entities\ActivityStreamPost::getByObjectUUID($this->getUUID())) {
             foreach ($entries as $entry) {
                 $entry->delete();
             }
         }
         if ($return = \Idno\Core\db()->deleteRecord($this->getID(), $this->collection)) {
             $this->deleteData();
             \Idno\Core\Idno::site()->triggerEvent('deleted', array('object' => $this));
             return $return;
         }
     }
     return false;
 }
示例#2
0
 /**
  * Delete this entity
  * @todo complete this
  * @return bool
  */
 function delete()
 {
     $event = new \Idno\Core\Event(array('object' => $this));
     $event->setResponse(true);
     if (\Idno\Core\Idno::site()->triggerEvent('delete', array('object' => $this))) {
         $this->unsyndicate();
         if ($return = \Idno\Core\db()->deleteRecord($this->getID(), $this->collection)) {
             $this->deleteData();
             \Idno\Core\Idno::site()->triggerEvent('deleted', array('object' => $this));
             return $return;
         }
     }
     return false;
 }