Exemplo n.º 1
0
 public function defaultAction(Request $request)
 {
     $id = $request->attributes()->get('id');
     if (isset($id)) {
         // $results['pageTitle'] = "Здвинская централизованная библиотечная система |";
         $container = $this->builder->components()->template()->get('app:Gallery/list');
         $container->galleries = $this->orm->query('gallery')->where("id_galery", $id)->find();
         $container->parend = $this->orm->query('gallery')->in($id)->findOne();
         $container->title = $container->parend->title_galery;
         $container->pageTitle = "Здвинская централизованная библиотечная система |" . $container->title;
         $container->description = $container->parend->txt;
     } else {
         $container = $this->builder->components()->template()->get('app:Gallery/view');
         $container->pageTitle = "Здвинская централизованная библиотечная система | Наша галерея";
         $container->description = "На этой страницы представленны изображения относящееся к Здвинской библиотеке или ЦБС Здвинск";
         $id_galery = "0";
         $container->galleries = $this->orm->query('gallery')->where("id_galery", $id_galery)->find();
     }
     $this->setGlobalProperty($container);
     return $container;
 }
Exemplo n.º 2
0
 public function viewAction(Request $request)
 {
     //Output the 'id' parameter
     return $request->attributes()->get('id');
 }