コード例 #1
0
 /**
  * Handle an advanced search
  *
  * @return mixed
  */
 public function advancedAction()
 {
     // Standard setup from base class:
     $view = parent::advancedAction();
     // Set up facet information:
     $view->facetList = $this->processAdvancedFacets($this->getAdvancedFacets()->getFacetList(), $view->saved);
     return $view;
 }
コード例 #2
0
ファイル: EdsController.php プロジェクト: grharry/vufind
 /**
  * Handle an advanced search
  *
  * @return mixed
  */
 public function advancedAction()
 {
     // Standard setup from base class:
     $view = parent::advancedAction();
     // Set up facet information:
     $view->limiterList = $this->processAdvancedFacets($this->getAdvancedFacets(), $view->saved);
     $view->expanderList = $this->processAdvancedExpanders($view->saved);
     $view->searchModes = $this->processAdvancedSearchModes($view->saved);
     $view->dateRangeLimit = $this->processPublicationDateRange($view->saved);
     return $view;
 }
コード例 #3
0
 /**
  * Handle an advanced search
  *
  * @return mixed
  */
 public function advancedAction()
 {
     // Standard setup from base class:
     $view = parent::advancedAction();
     // Set up facet information:
     $view->facetList = $this->processAdvancedFacets($this->getAdvancedFacets()->getFacetList(), $view->saved);
     $specialFacets = $view->options->getSpecialAdvancedFacets();
     if (stristr($specialFacets, 'illustrated')) {
         $view->illustratedLimit = $this->getIllustrationSettings($view->saved);
     }
     if (stristr($specialFacets, 'daterange')) {
         $view->dateRangeLimit = $this->getDateRangeSettings($view->saved);
     }
     return $view;
 }
コード例 #4
0
 /**
  * Execute the request
  *
  * @param MvcEvent $e Event
  *
  * @return mixed
  * @throws Exception\DomainException
  */
 public function onDispatch(MvcEvent $e)
 {
     // Add CORS headers and handle OPTIONS requests. This is a simplistic
     // approach since we allow any origin. For more complete CORS handling
     // a module like zfr-cors could be used.
     $response = $this->getResponse();
     $headers = $response->getHeaders();
     $headers->addHeaderLine('Access-Control-Allow-Origin: *');
     $request = $this->getRequest();
     if ($request->getMethod() == 'OPTIONS') {
         $headers->addHeaderLine('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
         $headers->addHeaderLine('Access-Control-Max-Age', '86400');
         return $this->output(null, 204);
     }
     return parent::onDispatch($e);
 }
コード例 #5
0
ファイル: SummonController.php プロジェクト: CUSAT/vufind
 /**
  * Handle an advanced search
  *
  * @return mixed
  */
 public function advancedAction()
 {
     // Standard setup from base class:
     $view = parent::advancedAction();
     // Set up facet information:
     $view->facetList = $this->processAdvancedFacets($this->getAdvancedFacets()->getFacetList(), $view->saved);
     $specialFacets = $this->parseSpecialFacetsSetting($view->options->getSpecialAdvancedFacets());
     if (isset($specialFacets['checkboxes'])) {
         $view->checkboxFacets = $this->processAdvancedCheckboxes($specialFacets['checkboxes'], $view->saved);
     }
     $view->ranges = $this->getAllRangeSettings($specialFacets, $view->saved, 'Summon');
     return $view;
 }
コード例 #6
0
ファイル: CombinedController.php プロジェクト: tillk/vufind
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->searchClassId = 'Combined';
     parent::__construct();
 }
コード例 #7
0
ファイル: SearchController.php プロジェクト: guenterh/vufind
 /**
  * Results action.
  *
  * @return mixed
  */
 public function resultsAction()
 {
     // Special case -- redirect tag searches.
     $tag = $this->params()->fromQuery('tag');
     if (!empty($tag)) {
         $query = $this->getRequest()->getQuery();
         $query->set('lookfor', $tag);
         $query->set('type', 'tag');
     }
     if ($this->params()->fromQuery('type') == 'tag') {
         return $this->forwardTo('Tag', 'Home');
     }
     // Default case -- standard behavior.
     return parent::resultsAction();
 }
コード例 #8
0
ファイル: TagController.php プロジェクト: datavoyager/vufind
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->searchClassId = 'Tags';
     parent::__construct();
 }
コード例 #9
0
 /**
  * Constructor
  */
 public function __construct()
 {
     $this->searchClassId = 'MixedList';
     $this->useResultScroller = false;
     parent::__construct();
 }
コード例 #10
0
 /**
  * Results action.
  *
  * @return mixed
  */
 public function resultsAction()
 {
     // Special case -- redirect tag searches.
     $tag = $this->params()->fromQuery('tag');
     if (!empty($tag)) {
         $query = $this->getRequest()->getQuery();
         $query->set('lookfor', $tag);
         $query->set('type', 'tag');
     }
     if ($this->params()->fromQuery('type') == 'tag') {
         // Because we're coming in from a search, we want to do a fuzzy
         // tag search, not an exact search like we would when linking to a
         // specific tag name.
         $query = $this->getRequest()->getQuery()->set('fuzzy', 'true');
         return $this->forwardTo('Tag', 'Home');
     }
     // Default case -- standard behavior.
     return parent::resultsAction();
 }
コード例 #11
0
 /**
  * Handle an advanced search
  *
  * @return mixed
  */
 public function advancedAction()
 {
     if (!$this->isAvailable()) {
         throw new \Exception('MetaLib is not enabled');
     }
     $view = parent::advancedAction();
     $view = $this->initSets($view, $this->getRequest()->getQuery());
     return $view;
 }