/** * Constructor * * @param \Zend\Config\Config $mainConfig VuFind main configuration (omit for * built-in defaults) * @param \Zend\Config\Config $recordConfig Record-specific configuration file * (omit to use $mainConfig as $recordConfig) * @param \Zend\Config\Config $searchSettings Search-specific configuration file */ public function __construct($mainConfig = null, $recordConfig = null, $searchSettings = null) { $this->preferredSnippetFields = ['description', 'fulltext']; parent::__construct($mainConfig, $recordConfig, $searchSettings); }
/** * Get the COinS identifier. * * @return string */ protected function getCoinsID() { // Added at Richard and Leslie's request, to facilitate ILL return parent::getCoinsID() . ".ebsco"; }
/** * Get the full title of the record. * * @return string */ public function getTitle() { $title = parent::getShortTitle(); return empty($title) ? $this->determineMissingTitle() : $title; }
/** * Constructor. */ public function __construct() { $this->resourceSource = 'missing'; parent::__construct(); }
/** * Returns one of three things: a full URL to a thumbnail preview of the record * if an image is available in an external system; an array of parameters to * send to VuFind's internal cover generator if no fixed URL exists; or false * if no thumbnail can be generated. * * @param string $size Size of thumbnail (small, medium or large -- small is * default). * * @return string|array|bool */ public function getThumbnail($size = 'small') { $params = parent::getThumbnail($size); // Support thumbnails embedded in the Summon record when no unique identifier // is found... (We don't use them in cases where we have an identifier, since // we want to allow these to be passed to configured external services). if (!isset($params['oclc']) && !isset($params['issn']) && !isset($params['isbn']) && !isset($params['upc'])) { if ($size === 'small' && isset($this->fields['thumbnail_s'][0])) { return ['proxy' => $this->fields['thumbnail_s'][0]]; } else { if (isset($this->fields['thumbnail_m'][0])) { return ['proxy' => $this->fields['thumbnail_m'][0]]; } } } $formats = $this->getFormats(); if (!empty($formats)) { $params['contenttype'] = $formats[0]; } return $params; }
/** * Factory for SolrDefault record driver. * * @param ServiceManager $sm Service manager. * * @return SolrDefault */ public static function getSolrDefault(ServiceManager $sm) { $driver = new SolrDefault($sm->getServiceLocator()->get('VuFind\\Config')->get('config'), null, $sm->getServiceLocator()->get('VuFind\\Config')->get('searches')); $driver->attachSearchService($sm->getServiceLocator()->get('VuFind\\Search')); return $driver; }