protected function onDelete() { if ($this->getImage()) { $this->load->helper('application'); deleteImageAndThumbs($this->getImage()); } }
/** * Delete all answers related and image for this question. */ protected function onDelete() { $answers = $this->answers->setOrderBy(NULL)->get($this->getId()); if (count($answers)) { foreach ($answers as $answer) { $answer->delete(); } } if ($this->getImage()) { $this->load->helper('application'); deleteImageAndThumbs($this->getImage()); } }
protected function onDelete() { $file = trim($this->getFile(), '/'); $this->load->helper('application'); deleteImageAndThumbs($file); }