/** * Deletes a collection of answers by their associated ids * * @param array $ids * @return boolean */ public function deleteByIds(array $ids) { foreach ($ids as $id) { if (!$this->answerMapper->deleteById($id)) { return false; } } return true; }
/** * Deletes a category by its associated id * * @param string $id * @return boolean */ public function deleteById($id) { return $this->answerMapper->deleteAllByCategoryId($id) && $this->categoryMapper->deleteById($id); }