コード例 #1
0
ファイル: Categories.php プロジェクト: spoonx/sxblog
 /**
  * @return \Doctrine\Common\Collections\Collection
  */
 public function getCategories()
 {
     if (null === $this->categories) {
         $this->categories = $this->categoryService->getCategories();
     }
     return $this->categories;
 }
コード例 #2
0
ファイル: CategoryController.php プロジェクト: spoonx/sxblog
 /**
  * @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());
 }