Ejemplo n.º 1
0
 /**
  * Get HierarchyPositionsInParents
  *
  * @inheritDoc
  *
  * @note Prevent php error for invalid index data. parent_id and sequence should
  *       contain the same amount of values which correspond
  *
  * @return Array
  */
 public function getHierarchyPositionsInParents()
 {
     if (isset($this->fields['hierarchy_parent_id']) && isset($this->fields['hierarchy_sequence'])) {
         if (sizeof($this->fields['hierarchy_parent_id']) > sizeof($this->fields['hierarchy_sequence'])) {
             $this->fields['hierarchy_parent_id'] = array_slice($this->fields['hierarchy_parent_id'], 0, sizeof($this->fields['hierarchy_sequence']));
         }
     }
     return parent::getHierarchyPositionsInParents();
 }
Ejemplo n.º 2
0
 /**
  * Get the statement of responsibility that goes with the title (i.e. "by John
  * Smith").
  *
  * @return string
  */
 public function getTitleStatement()
 {
     return $this->stripTrailingPunctuation(parent::getTitleStatement());
 }
Ejemplo n.º 3
0
 /**
  * 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'));
     $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;
 }
Ejemplo n.º 4
0
 /**
  * Get access to the raw File_MARC object.
  *
  * @return \File_MARCBASE
  * @throws \Exception
  * @throws \File_MARC_Exception
  */
 public function getMarcRecord()
 {
     // handle availability of fullrecord
     if (!isset($this->fields['fullrecord'])) {
         // retrieve fullrecord from external source
         if (!isset($this->fields['id'])) {
             throw new \Exception('No unique id given for fullrecord retrieval');
         }
         $this->fields['fullrecord'] = $this->getRemoteFullrecord($this->fields['id']);
     }
     return parent::getMarcRecord();
 }