ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
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 Member Functions

 fillHeaderAndTabs ()
 

Protected Attributes

ilObjUser $user
 
ilCtrl $ctrl
 
ILIAS $ilias
 
ilTabsGUI $tabs
 
ilHelpGUI $help
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilRbacSystem $system
 
Factory $refinery
 
ilSearchSettings $settings
 
ObjectSearchActions $object_search_actions
 
UserSearchActions $user_search_actions
 
AccessChecker $access_checker
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSearchControllerGUI::__construct ( )

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

54 {
55 global $DIC;
56
57 $service = new Service($DIC);
58
59 $this->ctrl = $DIC->ctrl();
60 $this->ilias = $DIC['ilias'];
61 $this->tabs = $DIC->tabs();
62 $this->help = $DIC->help();
63 $this->lng = $DIC->language();
64 $this->tpl = $DIC->ui()->mainTemplate();
65 $this->system = $DIC->rbac()->system();
66 $this->user = $DIC->user();
67
69 $this->access_checker = $service->gui()->accessChecker();
70 $this->object_search_actions = $service->gui()->objectSearchActions();
71 $this->user_search_actions = $service->gui()->userSearchActions();
72 }
$service
Definition: ltiresult.php:44
Class ilObjForumAdministration.
global $DIC
Definition: shib_login.php:26

References $DIC, $service, ILIAS\Repository\ctrl(), ilSearchSettings\getInstance(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), ILIAS\Repository\tabs(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilSearchControllerGUI::executeCommand ( )

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

74 : void
75 {
76 $this->fillHeaderAndTabs();
77
78 $forward_class = $this->ctrl->getNextClass($this);
79 switch ($forward_class) {
80 case 'illuceneusersearchgui':
81 if (!$this->access_checker->canAccessUserSearch()) {
82 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
83 }
84 $this->tabs->activateTab('search_tab_user');
85 $this->ctrl->forwardCommand(new ilLuceneUserSearchGUI());
86 break;
87
88 case 'ilsearchgui':
89 default:
90 if (!$this->access_checker->canAccessObjectSearch()) {
91 $this->ilias->raiseError($this->lng->txt("permission_denied"), $this->ilias->error_obj->MESSAGE);
92 }
93 $this->tabs->activateTab('search');
94 $search_gui = new ilSearchGUI();
95 $this->ctrl->forwardCommand($search_gui);
96 break;
97 }
98 $this->tpl->printToStdout();
99 }
@ilCtrl_IsCalledBy ilSearchGUI: ilSearchControllerGUI

References ILIAS\Repository\ctrl(), fillHeaderAndTabs(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ fillHeaderAndTabs()

ilSearchControllerGUI::fillHeaderAndTabs ( )
protected

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

101 : void
102 {
103 $this->tpl->loadStandardTemplate();
104
105 // tabs
106 if ($this->access_checker->canAccessObjectSearch()) {
107 $this->tabs->addTab(
108 'search',
109 $this->lng->txt('search_tab_content'),
110 (string) $this->object_search_actions->showSavedResults()
111 );
112 }
113 if ($this->access_checker->canAccessUserSearch()) {
114 $this->tabs->addTarget(
115 'search_tab_user',
116 (string) $this->user_search_actions->showSavedResults()
117 );
118 }
119
120 // help
121 if ($this->settings->enabledLucene()) {
122 $this->help->setScreenIdComponent('src_luc');
123 } else {
124 $this->help->setScreenIdComponent('src');
125
126 }
127
128 // header
129 $this->tpl->setTitleIcon(
130 ilObject::_getIcon(0, "big", "src"),
131 ""
132 );
133 $this->tpl->setTitle($this->lng->txt("search"));
134 }
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.

References ilObject\_getIcon(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ILIAS\Repository\tabs().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access_checker

AccessChecker ilSearchControllerGUI::$access_checker
protected

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

◆ $ctrl

ilCtrl ilSearchControllerGUI::$ctrl
protected

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

◆ $help

ilHelpGUI ilSearchControllerGUI::$help
protected

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

◆ $ilias

ILIAS ilSearchControllerGUI::$ilias
protected

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

◆ $lng

ilLanguage ilSearchControllerGUI::$lng
protected

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

◆ $object_search_actions

ObjectSearchActions ilSearchControllerGUI::$object_search_actions
protected

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

◆ $refinery

Factory ilSearchControllerGUI::$refinery
protected

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

◆ $settings

ilSearchSettings ilSearchControllerGUI::$settings
protected

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

◆ $system

ilRbacSystem ilSearchControllerGUI::$system
protected

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

◆ $tabs

ilTabsGUI ilSearchControllerGUI::$tabs
protected

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

◆ $tpl

ilGlobalTemplateInterface ilSearchControllerGUI::$tpl
protected

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

◆ $user

ilObjUser ilSearchControllerGUI::$user
protected

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

◆ $user_search_actions

UserSearchActions ilSearchControllerGUI::$user_search_actions
protected

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

◆ TYPE_USER_SEARCH

const int ilSearchControllerGUI::TYPE_USER_SEARCH = -1

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

Referenced by ilMainMenuSearchGUI\getHTML().


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