/** * @param id : id category to display * this aciton get the list of article of a category */ public function listAction() { $id = $this->getParam('id', 0); $this->assign('liste', $this->categoryService->listOneLevelByIdParent($id)); $idParent = -1; if ($id > 0) { $cat = $this->categoryService->get($id); $idParent = $cat->idParent; } $this->assign('idParent', $idParent); }