/** * Deletes a category by its associated id * Also remove items associated with given category id * * @param string $id * @return boolean Depending on success */ public function deleteById($id) { $name = Filter::escape($this->categoryMapper->fetchNameById($id)); $this->track('Category menu "%s" has been removed', $name); return $this->categoryMapper->deleteById($id) && $this->itemMapper->deleteAllByCategoryId($id); }