示例#1
0
 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]);
 }
示例#2
0
 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);
 }