コード例 #1
0
ファイル: MetaLib.php プロジェクト: bbeckman/NDL-VuFind2
 /**
  * Get default OpenURL parameters.
  *
  * @return array
  */
 protected function getDefaultOpenUrlParams()
 {
     $params = parent::getDefaultOpenUrlParams();
     if (isset($this->fields['isbn'])) {
         $isbn = $this->fields['isbn'];
         if (is_array($isbn) && !empty($isbn)) {
             $isbn = $isbn[0];
         }
         $params['rft.isbn'] = $isbn;
     }
     if (isset($this->fields['issn'])) {
         $issn = $this->fields['issn'];
         if (is_array($issn) && !empty($issn)) {
             $issn = $issn[0];
         }
         $params['rft.issn'] = $issn;
     }
     if (isset($this->fields['container_volume'])) {
         $params['rft.volume'] = $this->fields['container_volume'];
     }
     if (isset($this->fields['container_issue'])) {
         $params['rft.issue'] = $this->fields['container_issue'];
     }
     $params['rft.atitle'] = $params['rft.title'];
     return $params;
 }
コード例 #2
0
ファイル: Factory.php プロジェクト: samuli/vufind-ere
 /**
  * Factory for SolrMarc record driver.
  *
  * @param ServiceManager $sm Service manager.
  *
  * @return SolrMarc
  */
 public static function getSolrMarc(ServiceManager $sm)
 {
     $driver = new SolrMarc($sm->getServiceLocator()->get('VuFind\\Config')->get('config'), null, $sm->getServiceLocator()->get('VuFind\\Config')->get('searches'), $sm->getServiceLocator()->get('VuFind\\SearchResultsPluginManager'), $sm->getServiceLocator()->get('VuFind\\Config')->get('datasources'));
     $driver->attachILS($sm->getServiceLocator()->get('VuFind\\ILSConnection'), $sm->getServiceLocator()->get('VuFind\\ILSHoldLogic'), $sm->getServiceLocator()->get('VuFind\\ILSTitleHoldLogic'));
     $driver->attachSearchService($sm->getServiceLocator()->get('VuFind\\Search'));
     return $driver;
 }