/** Show the content of a category */ public function indexAction() { $this->formStorage->clearDefinition(); if ($this->hasParam('pos')) { $pos = $this->getParam('pos'); } else { $pos = 0; } $id = $this->getParam('idCat', 0); $cat = $this->categoryService->get($id); if ($cat == null) { $this->goHome(); return; } $this->assign('category', $cat); // recuperer la liste de toutes les categories filles $idCatz = $this->categoryService->listIdCategoriesForParent($id); $idCatz[] = $id; $this->assign('idz', $idCatz); $this->setTitleCurrentPage($this->getTitlesForIdCategory($id)); $this->saveLastPage(); if ($this->userService->checkRight('CONTENT_EDIT')) { $state = \org\equinox\modules\content\dao\ContentDto::STATE_ALL; } else { $state = \org\equinox\modules\content\dao\ContentDto::STATE_ONLINE; } $list = $this->contentService->listByIdCategories($idCatz, $state, $pos, self::PAGE_STEP + 1); if (sizeof($list) == self::PAGE_STEP + 1) { $this->assign('posNext', $pos + self::PAGE_STEP); array_pop($list); } else { $this->assign('posNext', -1); } $this->assign('pos', $pos); $this->assign('posPrec', $pos - self::PAGE_STEP); $this->assign('listeContent', $list); }