/**
  *
  * @return string series id
  * @throws Application_Util_BrowsingParamsException if requested series is not accessible in search context
  */
 public function getSeriesId()
 {
     try {
         $series = new Solrsearch_Model_Series($this->_request->getParam('id'));
         return $series->getId();
     } catch (Solrsearch_Model_Exception $e) {
         $this->log->debug($e->getMessage());
         throw new Application_Util_BrowsingParamsException($e->getMessage(), $e->getCode(), $e);
     }
 }
Example #2
0
 public function seriesAction()
 {
     $visibleSeries = Solrsearch_Model_Series::getVisibleNonEmptySeriesSortedBySortKey();
     if (count($visibleSeries) == 0) {
         $this->_redirectToAndExit('index');
     }
     $this->view->series = array();
     foreach ($visibleSeries as $series) {
         array_push($this->view->series, array('id' => $series->getId(), 'title' => $series->getTitle()));
     }
 }
Example #3
0
 private function prepareSeries()
 {
     $series = null;
     try {
         $series = new Solrsearch_Model_Series($this->getRequest()->getParam('id'));
     } catch (Solrsearch_Model_Exception $e) {
         $this->_logger->debug($e->getMessage());
         return $this->_redirectToAndExit('index', '', 'browse', null, array(), true);
     }
     $this->view->title = $series->getTitle();
     $this->view->seriesId = $series->getId();
     $this->view->infobox = $series->getInfobox();
     $this->view->logoFilename = $series->getLogoFilename();
 }
Example #4
0
 public function testGetLogoFilenameForNoLogoSeries()
 {
     $series = new Solrsearch_Model_Series(6);
     $this->assertNull($series->getLogoFilename());
 }