ILIAS  release_8 Revision v8.24
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 44 of file class.ilUserFilterGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilUserFilterGUI::__construct ( int  $a_usr_id)

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

58 {
59 global $DIC;
60
61 $this->lng = $DIC->language();
62 $this->ctrl = $DIC->ctrl();
63 $this->tpl = $DIC->ui()->mainTemplate();
64 $this->user = $DIC->user();
65 $this->http = $DIC->http();
66 $this->refinery = $DIC->refinery();
67
68 $this->lng->loadLanguageModule('trac');
69 $this->usr_id = $a_usr_id;
70 $this->__initFilter();
71 }
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.

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 133 of file class.ilUserFilterGUI.php.

133 : bool
134 {
135 $this->filter = new ilUserSearchFilter($this->user->getId());
136 return true;
137 }

References ILIAS\UI\examples\Symbol\Glyph\Filter\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 76 of file class.ilUserFilterGUI.php.

76 : void
77 {
78 switch ($this->ctrl->getNextClass()) {
79 default:
80 $cmd = $this->ctrl->getCmd() ? $this->ctrl->getCmd() : 'show';
81 $this->$cmd();
82
83 }
84 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getHTML()

ilUserFilterGUI::getHTML ( )

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

93 : string
94 {
95 $tpl = new ilTemplate('tpl.search_user_filter.html', true, true, 'Services/Search');
96
97 $tpl->setVariable("FILTER_ACTION", $this->ctrl->getFormAction($this));
98 $tpl->setVariable("TBL_TITLE", $this->lng->txt('trac_lp_filter'));
99 $tpl->setVariable("TXT_LOGIN", $this->lng->txt('login'));
100 $tpl->setVariable("TXT_FIRSTNAME", $this->lng->txt('firstname'));
101 $tpl->setVariable("TXT_LASTNAME", $this->lng->txt('lastname'));
102 $tpl->setVariable("BTN_REFRESH", $this->lng->txt('trac_refresh'));
103
104 $tpl->setVariable("QUERY", ilLegacyFormElementsUtil::prepareFormOutput($this->filter->getQueryString('login')));
106 "FIRSTNAME",
107 ilLegacyFormElementsUtil::prepareFormOutput($this->filter->getQueryString('firstname'))
108 );
110 "LASTNAME",
111 ilLegacyFormElementsUtil::prepareFormOutput($this->filter->getQueryString('lastname'))
112 );
113
114 return $tpl->get();
115 }
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\UI\examples\Symbol\Glyph\Filter\filter(), ilGlobalTemplateInterface\get(), ILIAS\Repository\lng(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilGlobalTemplateInterface\setVariable().

+ Here is the call graph for this function:

◆ getUserId()

ilUserFilterGUI::getUserId ( )

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

87 : int
88 {
89 return $this->usr_id;
90 }

References $usr_id.

◆ refresh()

ilUserFilterGUI::refresh ( )

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

119 : bool
120 {
121 $filter = [];
122 if ($this->http->wrapper()->post()->has('filter')) {
123 $filter = (array) ($this->http->request()->getParsedBody()['filter'] ?? []);
124 }
125 $this->ctrl->setParameter($this, 'offset', 0);
126 $this->filter->storeQueryStrings($filter);
127 $this->ctrl->returnToParent($this);
128
129 return true;
130 }
ilUserSearchFilter $filter

References $filter, ILIAS\Repository\ctrl(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), and ILIAS\FileDelivery\http().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilUserFilterGUI::$ctrl
protected

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

◆ $filter

ilUserSearchFilter ilUserFilterGUI::$filter
protected

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

Referenced by refresh().

◆ $http

GlobalHttpState ilUserFilterGUI::$http
protected

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

◆ $lng

ilLanguage ilUserFilterGUI::$lng
protected

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

◆ $refinery

Factory ilUserFilterGUI::$refinery
protected

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

◆ $tpl

ilGlobalTemplateInterface ilUserFilterGUI::$tpl
protected

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

Referenced by getHTML().

◆ $user

ilObjUser ilUserFilterGUI::$user
protected

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

◆ $usr_id

int ilUserFilterGUI::$usr_id
private

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

Referenced by getUserId().


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