ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilSearchControllerGUI Class Reference
+ Inheritance diagram for ilSearchControllerGUI:
+ Collaboration diagram for ilSearchControllerGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 

Data Fields

const int TYPE_USER_SEARCH = -1
 

Protected Attributes

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSearchControllerGUI::__construct ( )

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

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

44  {
45  global $DIC;
46 
47  $this->ctrl = $DIC->ctrl();
48  $this->ilias = $DIC['ilias'];
49  $this->lng = $DIC->language();
50  $this->tpl = $DIC->ui()->mainTemplate();
51  $this->system = $DIC->rbac()->system();
52  $this->http = $DIC->http();
53  $this->refinery = $DIC->refinery();
54  $this->user = $DIC->user();
55  }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26
Class ilObjForumAdministration.
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilSearchControllerGUI::executeCommand ( )

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

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

57  : void
58  {
59  // Check hacks
60  if (!$this->system->checkAccess('search', ilSearchSettings::_getSearchSettingRefId())) {
61  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
62  }
63  $forward_class = $this->ctrl->getNextClass($this);
64  switch ($forward_class) {
65  case 'illucenesearchgui':
66  $this->ctrl->forwardCommand(new ilLuceneSearchGUI());
67  break;
68 
69  case 'illuceneusersearchgui':
70  if ($this->user->getId() === ANONYMOUS_USER_ID) {
71  $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
72  }
73  $this->ctrl->forwardCommand(new ilLuceneUserSearchGUI());
74  break;
75 
76  case 'ilsearchgui':
77  default:
78  $search_gui = new ilSearchGUI();
79  $this->ctrl->forwardCommand($search_gui);
80  break;
81  }
82  $this->tpl->printToStdout();
83  }
const ANONYMOUS_USER_ID
Definition: constants.php:27
GUI class for 'simple' search.
static _getSearchSettingRefId()
Read the ref_id of Search Settings object.
Class ilObjForumAdministration.
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilSearchControllerGUI::$ctrl
protected

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

◆ $http

GlobalHttpState ilSearchControllerGUI::$http
protected

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

◆ $ilias

ILIAS ilSearchControllerGUI::$ilias
protected

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

◆ $lng

ilLanguage ilSearchControllerGUI::$lng
protected

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

◆ $refinery

Factory ilSearchControllerGUI::$refinery
protected

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

◆ $system

ilRbacSystem ilSearchControllerGUI::$system
protected

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

◆ $tpl

ilGlobalTemplateInterface ilSearchControllerGUI::$tpl
protected

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

◆ $user

ilObjUser ilSearchControllerGUI::$user
protected

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

◆ TYPE_USER_SEARCH

const int ilSearchControllerGUI::TYPE_USER_SEARCH = -1

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