Exemplo n.º 1
0
 function direct($throw = true)
 {
     $slug = $this->getRequest()->getParam('journal');
     $t = new Journaux();
     try {
         $journal = $t->findBySlug($slug);
     } catch (Strass_Db_Table_NotFound $e) {
         if ($throw) {
             throw new Strass_Controller_Action_Exception_NotFound("Journal " . $slug . " inexistant.");
         } else {
             return null;
         }
     }
     $this->setBranche($journal);
     $this->_actionController->metas(array('DC.Title' => $journal->nom, 'DC.Subject' => 'journaux,journal,gazette,blog'));
     return $journal;
 }