コード例 #1
0
 /**
  * Shows Archive Date menu
  *
  * @return void
  */
 public function archiveAction()
 {
     $currentNode = $this->request->getInternalArgument('__node');
     if ($this->request->hasArgument('newsBySelection')) {
         $nodeArgument = $this->request->getArgument('newsBySelection');
         $currentNode->setProperty('categoryId', $nodeArgument['category']);
         $currentNode->setProperty('folderId', $nodeArgument['folder']);
     }
     $categoryId = $currentNode->getProperty('categoryId');
     $folderId = $currentNode->getProperty('folderId');
     $this->view->assign('folderId', $folderId);
     $this->view->assign('categoryId', $categoryId);
     $category = NULL;
     $folder = NULL;
     if ($categoryId !== NULL) {
         $category = $categoryId;
     }
     if ($folderId !== NULL) {
         $folder = $folderId;
     }
     $this->view->assign('archiveFolder', $folder);
     $this->view->assign('archiveCategory', $category);
     $this->view->assign('archiveView', $this->newsService->archiveDateView($category, $folder));
     $this->view->assign('categories', $this->categoryService->getEnabledLatestCategories());
     $this->view->assign('folders', $this->folderService->listAll());
 }