ILIAS  trunk Revision v11.0_alpha-1811-gd2d5443e411
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator 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 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.

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

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

Member Function Documentation

◆ __initFilter()

ilUserFilterGUI::__initFilter ( )

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

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

Referenced by __construct().

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)
+ 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.

References ILIAS\Repository\ctrl().

70  : void
71  {
72  switch ($this->ctrl->getNextClass()) {
73  default:
74  $cmd = $this->ctrl->getCmd() ? $this->ctrl->getCmd() : 'show';
75  $this->$cmd();
76  }
77  }
+ Here is the call graph for this function:

◆ getHTML()

ilUserFilterGUI::getHTML ( )

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

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

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  );
102  $tpl->setVariable(
103  "LASTNAME",
104  ilLegacyFormElementsUtil::prepareFormOutput($this->filter->getQueryString('lastname'))
105  );
106 
107  return $tpl->get();
108  }
static prepareFormOutput($a_str, bool $a_strip=false)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilGlobalTemplateInterface $tpl
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
+ Here is the call graph for this function:

◆ getUserId()

ilUserFilterGUI::getUserId ( )

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

References $usr_id.

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

◆ refresh()

ilUserFilterGUI::refresh ( )

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

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

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  }
static http()
Fetches the global http state from ILIAS.
ilUserSearchFilter $filter
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
+ 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.

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

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