ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

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

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.
+ Here is the call graph for this function:

Member Function Documentation

◆ __initFilter()

ilUserFilterGUI::__initFilter ( )

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

References ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), and ILIAS\Repository\user().

Referenced by __construct().

133  : bool
134  {
135  $this->filter = new ilUserSearchFilter($this->user->getId());
136  return true;
137  }
+ 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.

References ILIAS\Repository\ctrl().

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  }
+ Here is the call graph for this function:

◆ getHTML()

ilUserFilterGUI::getHTML ( )

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

References ILIAS\Repository\ctrl(), ILIAS\UI\examples\Symbol\Glyph\Filter\filter(), ilGlobalTemplateInterface\get(), ILIAS\Repository\lng(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilGlobalTemplateInterface\setVariable().

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')));
105  $tpl->setVariable(
106  "FIRSTNAME",
107  ilLegacyFormElementsUtil::prepareFormOutput($this->filter->getQueryString('firstname'))
108  );
109  $tpl->setVariable(
110  "LASTNAME",
111  ilLegacyFormElementsUtil::prepareFormOutput($this->filter->getQueryString('lastname'))
112  );
113 
114  return $tpl->get();
115  }
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static prepareFormOutput($a_str, bool $a_strip=false)
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ getUserId()

ilUserFilterGUI::getUserId ( )

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

References $usr_id.

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

◆ refresh()

ilUserFilterGUI::refresh ( )

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

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

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  }
static http()
Fetches the global http state from ILIAS.
ilUserSearchFilter $filter
+ 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.

◆ $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.

◆ $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: