Example #1
0
 function direct($throw = true)
 {
     $slug = $this->getRequest()->getParam('album');
     $t = new Activites();
     try {
         $activite = $t->findBySlug($slug);
         $this->getRequest()->setParam('annee', $activite->getAnnee());
     } catch (Strass_Db_Table_NotFound $e) {
         if ($throw) {
             throw new Strass_Controller_Action_Exception_NotFound("Album " . $slug . " inexistant");
         } else {
             return null;
         }
     }
     $this->setBranche($activite);
     return $activite;
 }