public function listAction($type) { try { $list = $this->manager->getList($type); } catch (NotFoundException $e) { throw new NotFoundHttpException($e->getMessage()); } return $this->templating->renderResponse($this->templateList, ['list' => $list, 'tpl_item' => $this->templateItem]); }
public function catalogFunction(\Twig_Environment $env, $type, array $options = []) { $data = $this->setOptions($options); $data['list'] = $this->manager->getList($type); return $env->render($data['tpl_list'], $data); }