/** * @before _secured, _admin */ public function index() { $view = $this->getActionView(); $latestnews = App_Model_News::all(array('active = ?' => true), array('author', 'title', 'shortBody', 'created'), array('created' => 'DESC'), 8); $latestgallery = App_Model_Gallery::all(array('active = ?' => true), array('title', 'created', 'isPublic'), array('created' => 'DESC'), 10); $latestmembers = App_Model_User::all(array('active = ?' => true, 'role = ?' => 'role_member'), array('firstname', 'lastname', 'imgThumb', 'created'), array('created' => 'DESC'), 10); $latestdogs = App_Model_Dog::fetchAllLimit(); $view->set('latestnews', $latestnews)->set('latestgallery', $latestgallery)->set('latestmembers', $latestmembers)->set('latestdogs', $latestdogs); }
/** * * @param type $urlkey */ public function detail($urlkey) { $view = $this->getActionView(); $layoutView = $this->getLayoutView(); $gallery = App_Model_Gallery::fetchActivePublicGalleryByUrlkey($urlkey); if (null === $gallery) { $view->warningMessage(self::ERROR_MESSAGE_2); $this->_willRenderActionView = false; self::redirect('/galerie'); } $canonical = 'http://' . $this->getServerHost() . '/galerie/r/' . $urlkey; $layoutView->set('canonical', $canonical)->set('metatitle', $gallery->getTitle()); $view->set('gallery', $gallery); }
/** * @before _secured, _admin */ public function insertToContent() { $view = $this->getActionView(); $this->willRenderLayoutView = false; $galleries = App_Model_Gallery::all(array('isPublic = ?' => 1, 'active = ?' => true)); $view->set('galleries', $galleries); }