public function delete() { parent::delete(); }
public function delete() { $aggregation = $this->getAggregation(); GoogleGateway::unattendAllEvents($this->getGoogle_calendar_id(), $aggregation->getGoogle_calendar_id()); parent::delete(); }
public function delete() { if ($this->getPerson_id() == $_SESSION['USER']->getId()) { parent::delete(); } }
public function delete() { if ($this->isSafeToDelete()) { $zend_db = Database::getConnection(); $zend_db->query('delete from department_actions where department_id=?', array($this->getId())); parent::delete(); } else { throw new \Exception('departments/foreignKeyViolation'); } }
public function delete() { if ($this->getId()) { foreach ($this->getMedia() as $m) { $m->delete(); } $zend_db = Database::getConnection(); $zend_db->query('delete from issue_labels where issue_id=?')->execute([$this->getId()]); $zend_db->query('delete from issueHistory where issue_id=?')->execute([$this->getId()]); $zend_db->query('delete from responses where issue_id=?')->execute([$this->getId()]); parent::delete(); } }
public function delete() { foreach ($this->getIssues() as $i) { $i->delete(); } foreach ($this->getHistory() as $h) { $h->delete(); } $search = new Search(); $search->delete($this); $search->solrClient->commit(); parent::delete(); }
public function delete() { if ($this->getId()) { if ($this->hasTickets()) { throw new \Exception('people/personStillHasTickets'); } $zend_db = Database::getConnection(); $zend_db->query('delete from peopleAddresses where person_id=?', [$this->getId()]); $zend_db->query('delete from peoplePhones where person_id=?', [$this->getId()]); $zend_db->query('delete from peopleEmails where person_id=?', [$this->getId()]); parent::delete(); } }
public function delete() { $this->deleteFile(); parent::delete(); }
/** * Deletes the file from the hard drive */ public function delete() { unlink(SITE_HOME . "/media/{$this->getDirectory()}/{$this->getInternalFilename()}"); parent::delete(); }
public function delete() { $person = $this->getPerson(); parent::delete(); // If we delete the only email used for notifications, // we need to mark one of the other email addresses. $zend_db = Database::getConnection(); $result = $zend_db->query('select count(*) as c from peopleEmails where usedForNotifications=1 and person_id=?')->execute([$person->getId()]); $row = $result->current(); if (!$row['c']) { $list = $person->getEmails(); if (count($list)) { $e = $list->current(); $e->setUsedForNotifications(true); $e->save(); } } }