/** * * @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); } }
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())); } }
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(); }
public function testGetLogoFilenameForNoLogoSeries() { $series = new Solrsearch_Model_Series(6); $this->assertNull($series->getLogoFilename()); }