ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSearchControllerGUI Class Reference
+ Inheritance diagram for ilSearchControllerGUI:
+ Collaboration diagram for ilSearchControllerGUI:

Public Member Functions

 __construct ()
 Constructor public. More...
 
 executeCommand ()
 

Data Fields

const TYPE_USER_SEARCH = -1
 

Protected Attributes

ilObjUser $user
 
ilCtrl $ctrl
 
ILIAS $ilias
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilRbacSystem $system
 
GlobalHttpState $http
 
Factory $refinery
 

Detailed Description

Definition at line 35 of file class.ilSearchControllerGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilSearchControllerGUI::__construct ( )

Constructor public.

Definition at line 53 of file class.ilSearchControllerGUI.php.

References $DIC, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().

54  {
55  global $DIC;
56 
57  $this->ctrl = $DIC->ctrl();
58  $this->ilias = $DIC['ilias'];
59  $this->lng = $DIC->language();
60  $this->tpl = $DIC->ui()->mainTemplate();
61  $this->system = $DIC->rbac()->system();
62  $this->http = $DIC->http();
63  $this->refinery = $DIC->refinery();
64  $this->user = $DIC->user();
65  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:22
Class ilObjForumAdministration.
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilSearchControllerGUI::executeCommand ( )

Definition at line 67 of file class.ilSearchControllerGUI.php.

References ilSearchSettings\_getSearchSettingRefId(), ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

67  : void
68  {
69  // Check hacks
70  if (!$this->system->checkAccess('search', ilSearchSettings::_getSearchSettingRefId())) {
71  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
72  }
73  $forward_class = $this->ctrl->getNextClass($this);
74  switch ($forward_class) {
75  case 'illucenesearchgui':
76  $this->ctrl->forwardCommand(new ilLuceneSearchGUI());
77  break;
78 
79  case 'illuceneadvancedsearchgui':
80  $this->ctrl->forwardCommand(new ilLuceneAdvancedSearchGUI());
81  break;
82 
83  case 'illuceneusersearchgui':
84  if ($this->user->getId() === ANONYMOUS_USER_ID) {
85  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
86  }
87  $this->ctrl->forwardCommand(new ilLuceneUserSearchGUI());
88  break;
89 
90  case 'iladvancedsearchgui':
91  $this->ctrl->forwardCommand(new ilAdvancedSearchGUI());
92  break;
93 
94  case 'ilsearchgui':
95  default:
96  $search_gui = new ilSearchGUI();
97  $this->ctrl->forwardCommand($search_gui);
98  break;
99  }
100  $this->tpl->printToStdout();
101  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
Class ilSearchGUI.
GUI for simple Lucene search
static _getSearchSettingRefId()
Read the ref_id of Search Settings object.
Class ilObjForumAdministration.
GUI for Lucene user search
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilSearchControllerGUI::$ctrl
protected

Definition at line 40 of file class.ilSearchControllerGUI.php.

◆ $http

GlobalHttpState ilSearchControllerGUI::$http
protected

Definition at line 45 of file class.ilSearchControllerGUI.php.

◆ $ilias

ILIAS ilSearchControllerGUI::$ilias
protected

Definition at line 41 of file class.ilSearchControllerGUI.php.

◆ $lng

ilLanguage ilSearchControllerGUI::$lng
protected

Definition at line 42 of file class.ilSearchControllerGUI.php.

◆ $refinery

Factory ilSearchControllerGUI::$refinery
protected

Definition at line 46 of file class.ilSearchControllerGUI.php.

◆ $system

ilRbacSystem ilSearchControllerGUI::$system
protected

Definition at line 44 of file class.ilSearchControllerGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilSearchControllerGUI::$tpl
protected

Definition at line 43 of file class.ilSearchControllerGUI.php.

◆ $user

ilObjUser ilSearchControllerGUI::$user
protected

Definition at line 38 of file class.ilSearchControllerGUI.php.

◆ TYPE_USER_SEARCH

const ilSearchControllerGUI::TYPE_USER_SEARCH = -1

The documentation for this class was generated from the following file: