public function delete() { if ($result = parent::delete()) { $this->setStatus(self::LOGGED_OUT); } return $result; }
public function delete() { $return = parent::delete(); if ($return) { $this->getObject('com:files.controller.file', array('request' => $this->getObject('lib:controller.request', array('query' => array('container' => $this->container, 'name' => $this->path)))))->delete(); $relations = $this->getObject('com:attachments.database.table.relations')->select(array('attachments_attachment_id' => $this->id)); $relations->delete(); } return $return; }
public function delete() { $return = parent::delete(); if ($return) { $request = $this->getObject('lib:controller.request', array('query' => array('container' => $this->container, 'name' => array($this->path, $this->thumbnail)))); try { $this->getObject('com:files.controller.file', array('request' => $request))->delete(); } catch (Library\ControllerExceptionNotFound $e) { } $this->getObject('com:attachments.database.table.relations')->select(array('attachments_attachment_id' => $this->id))->delete(); } return $return; }
/** * Deletes the tag form the database. * * If only one relationship exists in the actual tag will also be deleted. Otherwise only the relation will be * removed. * * @return DatabaseRowTag */ public function delete() { //Delete the tag $relation = $this->getObject('com:tags.database.row.relation'); $relation->tags_tag_id = $this->id; if ($relation->count() <= 1) { parent::delete(); } //Delete the relation if ($this->row && $this->table) { $relation = $this->getObject('com:tags.database.row.relation', array('status' => Database::STATUS_LOADED)); $relation->tags_tag_id = $this->id; $relation->row = $this->row; $relation->table = $this->table; $relation->delete(); } return true; }