/** * Return the search engine config * * @return Config */ public function getConfig() { return Config::getInstance(); }
public function map() { parent::map(); // we assume that all records have items // ... unless told otherwise // here we've defined marc fields that contain the physical holdings // if the record doesn't have these, then it doesn't have items $config = Config::getInstance(); $item_field = $config->getConfig("ITEM_FIELD", false); $item_query = $config->getConfig("ITEM_FIELD_QUERY", false); // simple field value if ($item_field != null) { $items = $this->datafield($item_field); // print_r($items); if ($items->length() == 0) { $this->physical_holdings = false; } } elseif ($item_query != null) { $items = $this->marc->xpath($item_query); // print_r($items); if ($items->length == 0) { $this->physical_holdings = false; } } }
/** * (non-PHPdoc) * @see Application\Controller.SearchController::recordAction() */ public function recordAction() { $response = parent::recordAction(); $results = $this->response->getVariable('results'); $result = $results->getRecord(0); // special display for solr if ($result->getXerxesRecord() instanceof Solr\Record) { $response->setView('folder/books/record.xsl'); $response->setVariable('folder_config', Solr\Config::getInstance()); } return $response; }