Esempio n. 1
0
 public function addQueryLinks(Query $query)
 {
     parent::addQueryLinks($query);
     foreach ($query->getLimits() as $limit) {
         $params = $this->currentParams();
         $params = Parser::removeFromArray($params, $limit->field, $limit->value);
         $params['action'] = 'search';
         $limit->remove_url = $this->request->url_for($params);
     }
 }
Esempio n. 2
0
 public function addFacetLinks(ResultSet &$results)
 {
     parent::addFacetLinks($results);
     // peer-review quasi-facet
     $facets = $results->getFacets();
     $params = $this->facetParams();
     if (array_key_exists("scholarly", $params)) {
         unset($params["scholarly"]);
     } else {
         $params["scholarly"] = "Scholarly only";
     }
     $facets->refereed_link = $this->request->url_for($params);
 }
 /**
  * Individual record
  */
 public function recordAction()
 {
     $id = $this->request->getParam('id');
     // get the record
     $results = $this->engine->getRecord($id);
     if ($this->request->getParam('original') != null || $this->config->getConfig('INCLUDE_ORIGINAL_RECORD', false)) {
         $results->getRecord(0)->includeOriginalRecord();
     }
     // set lables and links
     $this->helper->addResultsLabels($results);
     $this->helper->addRecordLinks($results);
     // add to response
     $this->response->setVariable('results', $results);
     // view template
     $this->response->setView($this->id . '/record.xsl');
     return $this->response;
 }
Esempio n. 4
0
 /**
  * Parameters to construct the url on the search redirect
  * Accounts for worldcat 'source' identifier
  * @return array
  */
 public function searchRedirectParams()
 {
     $params = parent::searchRedirectParams();
     $params['source'] = $this->request->getParam('source');
     return $params;
 }