ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilUserFilterGUI Class Reference
+ Collaboration diagram for ilUserFilterGUI:

Public Member Functions

 __construct (int $a_usr_id)
 
 executeCommand ()
 execute command More...
 
 getUserId ()
 
 getHTML ()
 
 refresh ()
 
 __initFilter ()
 

Protected Attributes

ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilUserSearchFilter $filter
 
ilObjUser $user
 
GlobalHttpState $http
 
Factory $refinery
 

Private Attributes

int $usr_id
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilUserFilterGUI::__construct ( int  $a_usr_id)

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

52 {
53 global $DIC;
54
55 $this->lng = $DIC->language();
56 $this->ctrl = $DIC->ctrl();
57 $this->tpl = $DIC->ui()->mainTemplate();
58 $this->user = $DIC->user();
59 $this->http = $DIC->http();
60 $this->refinery = $DIC->refinery();
61
62 $this->lng->loadLanguageModule('trac');
63 $this->usr_id = $a_usr_id;
64 $this->__initFilter();
65 }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ __initFilter()

ilUserFilterGUI::__initFilter ( )

Definition at line 126 of file class.ilUserFilterGUI.php.

126 : bool
127 {
128 $this->filter = new ilUserSearchFilter($this->user->getId());
129 return true;
130 }
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)

References ILIAS\Repository\filter(), and ILIAS\Repository\user().

Referenced by __construct().

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

◆ executeCommand()

ilUserFilterGUI::executeCommand ( )

execute command

Definition at line 70 of file class.ilUserFilterGUI.php.

70 : void
71 {
72 switch ($this->ctrl->getNextClass()) {
73 default:
74 $cmd = $this->ctrl->getCmd() ? $this->ctrl->getCmd() : 'show';
75 $this->$cmd();
76 }
77 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getHTML()

ilUserFilterGUI::getHTML ( )

Definition at line 86 of file class.ilUserFilterGUI.php.

86 : string
87 {
88 $tpl = new ilTemplate('tpl.search_user_filter.html', true, true, 'components/ILIAS/Search');
89
90 $tpl->setVariable("FILTER_ACTION", $this->ctrl->getFormAction($this));
91 $tpl->setVariable("TBL_TITLE", $this->lng->txt('trac_lp_filter'));
92 $tpl->setVariable("TXT_LOGIN", $this->lng->txt('login'));
93 $tpl->setVariable("TXT_FIRSTNAME", $this->lng->txt('firstname'));
94 $tpl->setVariable("TXT_LASTNAME", $this->lng->txt('lastname'));
95 $tpl->setVariable("BTN_REFRESH", $this->lng->txt('trac_refresh'));
96
97 $tpl->setVariable("QUERY", ilLegacyFormElementsUtil::prepareFormOutput($this->filter->getQueryString('login')));
99 "FIRSTNAME",
100 ilLegacyFormElementsUtil::prepareFormOutput($this->filter->getQueryString('firstname'))
101 );
103 "LASTNAME",
104 ilLegacyFormElementsUtil::prepareFormOutput($this->filter->getQueryString('lastname'))
105 );
106
107 return $tpl->get();
108 }
static prepareFormOutput($a_str, bool $a_strip=false)
special template class to simplify handling of ITX/PEAR
ilGlobalTemplateInterface $tpl
setVariable(string $variable, $value='')
Sets the given variable to the given value.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.

References $tpl, ILIAS\Repository\ctrl(), ILIAS\Repository\filter(), ILIAS\UICore\GlobalTemplate\get(), ILIAS\Repository\lng(), ilLegacyFormElementsUtil\prepareFormOutput(), and ILIAS\UICore\GlobalTemplate\setVariable().

+ Here is the call graph for this function:

◆ getUserId()

ilUserFilterGUI::getUserId ( )

Definition at line 80 of file class.ilUserFilterGUI.php.

80 : int
81 {
82 return $this->usr_id;
83 }

References $usr_id.

◆ refresh()

ilUserFilterGUI::refresh ( )

Definition at line 112 of file class.ilUserFilterGUI.php.

112 : bool
113 {
114 $filter = [];
115 if ($this->http->wrapper()->post()->has('filter')) {
116 $filter = (array) ($this->http->request()->getParsedBody()['filter'] ?? []);
117 }
118 $this->ctrl->setParameter($this, 'offset', 0);
119 $this->filter->storeQueryStrings($filter);
120 $this->ctrl->returnToParent($this);
121
122 return true;
123 }
ilUserSearchFilter $filter

References $filter, ILIAS\Repository\ctrl(), ILIAS\Repository\filter(), and ILIAS\FileDelivery\http().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilUserFilterGUI::$ctrl
protected

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

◆ $filter

ilUserSearchFilter ilUserFilterGUI::$filter
protected

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

Referenced by refresh().

◆ $http

GlobalHttpState ilUserFilterGUI::$http
protected

Definition at line 47 of file class.ilUserFilterGUI.php.

◆ $lng

ilLanguage ilUserFilterGUI::$lng
protected

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

◆ $refinery

Factory ilUserFilterGUI::$refinery
protected

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

◆ $tpl

ilGlobalTemplateInterface ilUserFilterGUI::$tpl
protected

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

Referenced by getHTML().

◆ $user

ilObjUser ilUserFilterGUI::$user
protected

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

◆ $usr_id

int ilUserFilterGUI::$usr_id
private

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

Referenced by getUserId().


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