コード例 #1
0
ファイル: SolrWeb.php プロジェクト: tillk/vufind
 /**
  * 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);
 }
コード例 #2
0
ファイル: EIT.php プロジェクト: tillk/vufind
 /**
  * Get the COinS identifier.
  *
  * @return string
  */
 protected function getCoinsID()
 {
     // Added at Richard and Leslie's request, to facilitate ILL
     return parent::getCoinsID() . ".ebsco";
 }
コード例 #3
0
ファイル: Missing.php プロジェクト: steenlibrary/vufind
 /**
  * Get the full title of the record.
  *
  * @return string
  */
 public function getTitle()
 {
     $title = parent::getShortTitle();
     return empty($title) ? $this->determineMissingTitle() : $title;
 }
コード例 #4
0
ファイル: Missing.php プロジェクト: no-reply/cbpl-vufind
 /**
  * Constructor.
  */
 public function __construct()
 {
     $this->resourceSource = 'missing';
     parent::__construct();
 }
コード例 #5
0
ファイル: Summon.php プロジェクト: guenterh/vufind
 /**
  * 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;
 }
コード例 #6
0
ファイル: Factory.php プロジェクト: samuli/vufind-ere
 /**
  * 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;
 }