/**
  * Shows a list of categories
  *
  * @return void
  */
 public function indexAction()
 {
     $currentNode = $this->request->getInternalArgument('__node');
     $pluginArguments = $this->request->getPluginArguments();
     $folderId = $currentNode->getproperty('folderId');
     $parentCategoryId = $currentNode->getproperty('parentCategoryId');
     if ($folderId == '' && $parentCategoryId == '') {
         $categories = $this->categoryService->listAll($pluginArguments);
     } elseif ($folderId != '' && $parentCategoryId == '') {
         $categories = $this->categoryService->listAllByFolder($folderId);
     } else {
         $categories = $this->categoryService->listAllByFolderAndCategory($folderId, $parentCategoryId);
     }
     $this->view->assign('categories', $categories);
 }
 /**
  * Shows a form for creating a new category object
  *
  * @return void
  */
 public function newAction()
 {
     $this->view->assign('folders', $this->folderService->listAll());
     $this->view->assign('newsParentCategory', $this->categoryService->listAll());
 }