コード例 #1
0
 /**
  * Constructor
  */
 public function __construct()
 {
     // Override some defaults:
     $this->searchClassId = 'EDS';
     $this->fallbackDefaultTab = 'Description';
     // Call standard record controller initialization:
     parent::__construct();
 }
コード例 #2
0
 /**
  * Constructor
  */
 public function __construct()
 {
     // Call standard record controller initialization:
     parent::__construct();
     // Load default tab setting:
     $config = ConfigReader::getConfig();
     $this->defaultTab = isset($config->Site->defaultRecordTab) ? $config->Site->defaultRecordTab : 'Holdings';
 }
コード例 #3
0
 /**
  * Display a particular tab.
  *
  * @param string $tab  Name of tab to display
  * @param bool   $ajax Are we in AJAX mode?
  *
  * @return mixed
  */
 protected function showTab($tab, $ajax = false)
 {
     $view = parent::showTab($tab, $ajax);
     $memory = $this->getServiceLocator()->get('VuFind\\Search\\Memory');
     if ($last = $memory->retrieve()) {
         $parts = parse_url($last);
         if (isset($parts['query'])) {
             parse_str($parts['query'], $params);
             if (isset($params['set'])) {
                 $view->metalibSet = $params['set'];
             }
         }
     }
     return $view;
 }
コード例 #4
0
 /**
  * Register the default events for this controller
  *
  * @return void
  */
 protected function attachDefaultListeners()
 {
     parent::attachDefaultListeners();
     $events = $this->getEventManager();
     $events->attach(MvcEvent::EVENT_DISPATCH, [$this, 'preDispatch'], 1000);
 }
コード例 #5
0
 /**
  * Register the default events for this controller
  *
  * @return void
  */
 protected function attachDefaultListeners()
 {
     parent::attachDefaultListeners();
     $events = $this->getEventManager();
     $events->attach(MvcEvent::EVENT_DISPATCH, [$this, 'injectSummonMessage'], 1000);
 }