/** * @return \Doctrine\Common\Collections\Collection */ public function getCategories() { if (null === $this->categories) { $this->categories = $this->categoryService->getCategories(); } return $this->categories; }
/** * @return \Zend\Http\Response */ public function deleteAction() { $slug = $this->params('slug'); $this->categoryService->delete($slug); $this->flashMessenger()->setNamespace('sxblog_category')->addMessage($this->getMessage('category_deletion_success')); return $this->redirect()->toRoute($this->options->getRouteAfterCategoryDelete()); }