18 declare(strict_types=1);
    51         $this->
setId(
'myst_lu');
    55         $this->uiFactory = $DIC->ui()->factory();
    56         $this->uiRenderer = $DIC->ui()->renderer();
    59         $this->
setRowTemplate(
'tpl.list_users_row.html', 
"Services/MyStaff");
    60         $this->
setFormAction($DIC->ctrl()->getFormAction($parent_obj));
    90         $arr_usr_id = $this->
access->getUsersForUser($DIC->user()->getId());
    93             'filters' => $this->
filter,
   105         $result = $list_users_fetcher->getData($arr_usr_id, $options);
   107         $this->
setMaxCount($result->getTotalDatasetCount());
   108         $data = $result->getDataset();
   122         $item = new \ilTextInputGUI(
   123             $DIC->language()->txt(
"login") . 
"/" . $DIC->language()->txt(
"email") . 
"/" . $DIC->language()
   128         $item->readFromSession();
   129         $this->
filter[
'user'] = $item->getValue();
   133             $options[0] = $DIC->language()->txt(
'mst_opt_all');
   134             foreach ($paths as $org_ref_id => 
$path) {
   135                 $options[$org_ref_id] = 
$path;
   137             $item = new \ilSelectInputGUI($DIC->language()->txt(
'obj_orgu'), 
'org_unit');
   138             $item->setOptions($options);
   139             $item->addCustomAttribute(
"style='width:100%'");
   141             $item->readFromSession();
   142             $this->
filter[
'org_unit'] = $item->getValue();
   148         if ($this->cached_selectable_columns) {
   157         $arr_fields_without_table_sort = array(
   160             'interests_help_offered',
   161             'interests_help_looking',
   166             if (!in_array(
$key, $arr_fields_without_table_sort)) {
   172         foreach ($user_defined_fields->getDefinitions() as $field => $definition) {
   173             unset($cols[
"udf_" . $field]);
   190                 $sort = $v[
'sort_field'] ?? 
"";
   196             $this->
addColumn($DIC->language()->txt(
'actions'));
   202         if (isset($this->usr_orgu_names[$user_id])) {
   203             return $this->usr_orgu_names[$user_id];
   206         return $this->usr_orgu_names[$user_id] = \ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_id);
   215     final protected function fillRow(array $a_set): void
   217         $set = array_pop($a_set);
   219         $propGetter = \Closure::bind(
function ($prop) {
   220             return $this->$prop ?? null;
   224         $this->tpl->setCurrentBlock(
'user_profile_picture');
   225         $il_obj_user = $set->returnIlUserObj();
   226         $avatar = $this->uiFactory->image()->standard($il_obj_user->getPersonalPicturePath(
'small'), $il_obj_user->getPublicName());
   227         $this->tpl->setVariable(
'user_profile_picture', $this->uiRenderer->render($avatar));
   228         $this->tpl->parseCurrentBlock();
   233                     $this->tpl->setCurrentBlock(
'td');
   234                     $this->tpl->setVariable(
   238                     $this->tpl->parseCurrentBlock();
   241                     $this->tpl->setCurrentBlock(
'td');
   242                         $this->tpl->setVariable(
'VALUE', $this->
language->txt(
'gender_' . $set->getGender()));
   243                     $this->tpl->parseCurrentBlock();
   245                 case 'interests_general':
   246                     $this->tpl->setCurrentBlock(
'td');
   247                     $this->tpl->setVariable(
'VALUE', ($set->returnIlUserObj()
   248                                                             ->getGeneralInterestsAsText() ? $set->returnIlUserObj()->getGeneralInterestsAsText() : 
' '));
   249                     $this->tpl->parseCurrentBlock();
   251                 case 'interests_help_offered':
   252                     $this->tpl->setCurrentBlock(
'td');
   253                     $this->tpl->setVariable(
'VALUE', ($set->returnIlUserObj()
   254                                                             ->getOfferingHelpAsText() ? $set->returnIlUserObj()->getOfferingHelpAsText() : 
' '));
   255                     $this->tpl->parseCurrentBlock();
   257                 case 'interests_help_looking':
   258                     $this->tpl->setCurrentBlock(
'td');
   259                     $this->tpl->setVariable(
'VALUE', ($set->returnIlUserObj()
   260                                                             ->getLookingForHelpAsText() ? $set->returnIlUserObj()->getLookingForHelpAsText() : 
' '));
   261                     $this->tpl->parseCurrentBlock();
   264                     if ($propGetter($k) !== null) {
   265                         $this->tpl->setCurrentBlock(
'td');
   266                         $this->tpl->setVariable(
   268                             (is_array($propGetter($k)) ? implode(
", ", $propGetter($k)) : $propGetter($k))
   270                         $this->tpl->parseCurrentBlock();
   272                         $this->tpl->setCurrentBlock(
'td');
   273                         $this->tpl->setVariable(
'VALUE', 
' ');
   274                         $this->tpl->parseCurrentBlock();
   280         $mst_lus_usr_id = $set->getUsrId();
   284         if ($this->
access->hasCurrentUserAccessToCourseMemberships()) {
   285             $this->
ctrl->setParameterByClass(\ilMStShowUserCoursesGUI::class, 
'usr_id', $mst_lus_usr_id);
   286             $actions[] = $this->uiFactory->link()->standard(
   287                 $this->
language->txt(
"mst_show_courses"),
   288                 $this->
ctrl->getLinkTargetByClass([
   289                     \ilDashboardGUI::class,
   290                     \ilMyStaffGUI::class,
   291                     \ilMStShowUserGUI::class,
   292                     \ilMStShowUserCoursesGUI::class,
   297         if ($this->
access->hasCurrentUserAccessToCertificates()) {
   298             $this->
ctrl->setParameterByClass(\ilUserCertificateGUI::class, 
'usr_id', $mst_lus_usr_id);
   299             $actions[] = $this->uiFactory->link()->standard(
   300                 $this->
language->txt(
"mst_list_certificates"),
   301                 $this->
ctrl->getLinkTargetByClass([
   302                     \ilDashboardGUI::class,
   303                     \ilMyStaffGUI::class,
   304                     \ilMStShowUserGUI::class,
   305                     \ilUserCertificateGUI::class,
   310         if ($this->
access->hasCurrentUserAccessToCompetences()) {
   311             $this->
ctrl->setParameterByClass(\ilMStShowUserCompetencesGUI::class, 
'usr_id', $mst_lus_usr_id);
   312             $actions[] = $this->uiFactory->link()->standard(
   313                 $this->
language->txt(
"mst_list_competences"),
   314                 $this->
ctrl->getLinkTargetByClass([
   315                     \ilDashboardGUI::class,
   316                     \ilMyStaffGUI::class,
   317                     \ilMStShowUserGUI::class,
   318                     \ilMStShowUserCompetencesGUI::class,
   324         $this->
ctrl->setParameterByClass(\ilMStListUsersGUI::class, 
'mst_lus_usr_id', $mst_lus_usr_id);
   326         $actions[] = \ilMyStaffGUI::extendActionMenuWithUserActions(
   331         $dropdown = $this->uiFactory->dropdown()->standard($actions)->withLabel($this->
lng->txt(
"actions"));
   332         $this->tpl->setVariable(
"ACTIONS", $this->uiRenderer->render($dropdown));
   333         $this->tpl->parseCurrentBlock();
   340         return rawurlencode($DIC->ctrl()->getLinkTargetByClass(
   341             strtolower(\ilMyStaffGUI::class),
   348         $set = array_pop($a_set);
   352             $a_excel->
setCell($a_row, $col, $v);
   359         $set = array_pop($a_set);
   371         $propGetter = \Closure::bind(
function ($prop) {
   372             return $this->$prop ?? null;
   373         }, $my_staff_user, $my_staff_user);
   375         $field_values = array();
   383                     $field_values[$k] = $DIC->language()->txt(
'gender_' . $my_staff_user->
getGender());
   385                 case 'interests_general':
   386                     $field_values[$k] = $my_staff_user->
returnIlUserObj()->getGeneralInterestsAsText();
   388                 case 'interests_help_offered':
   389                     $field_values[$k] = $my_staff_user->
returnIlUserObj()->getOfferingHelpAsText();
   391                 case 'interests_help_looking':
   392                     $field_values[$k] = $my_staff_user->
returnIlUserObj()->getLookingForHelpAsText();
   395                     $field_values[$k] = strip_tags($propGetter($k) ?? 
"");
   400         return $field_values;
 
ILIAS UI Renderer $uiRenderer
 
setExportFormats(array $formats)
Set available export formats. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setFormAction(string $a_form_action, bool $a_multipart=false)
 
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
 
getTextRepresentationOfUsersOrgUnits(int $user_id)
 
setEnableTitle(bool $a_enabletitle)
 
setDisableFilterHiding(bool $a_val=true)
 
getFieldValuesForExport(ilMStListUser $my_staff_user)
 
ILIAS UI Factory $uiFactory
 
setCell(int $a_row, int $a_col, $a_value, ?string $a_datatype=null)
Set cell value. 
 
setFormName(string $a_name="")
 
Class ilMStListUsersTableGUI. 
 
fillRowExcel(\ilExcel $a_excel, int &$a_row, array $a_set)
 
array $cached_selectable_columns
 
static getTextRepresentationOfOrgUnits(bool $sort_by_title=true)
Get ref id path array. 
 
fillRowCSV(\ilCSVWriter $a_csv, array $a_set)
 
setExternalSorting(bool $a_val)
 
isColumnSelected(string $col)
 
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setDefaultOrderField(string $a_defaultorderfield)
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
setDefaultOrderDirection(string $a_defaultorderdirection)
 
static getSelectableColumnInfo(bool $a_admin=false)
Get info of searchable fields for selectable columns in table gui. 
 
setEnableNumInfo(bool $a_val)
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
 
__construct(\ilMStListUsersGUI $parent_obj, $parent_cmd=\ilMStListUsersGUI::CMD_INDEX)
 
static _isEnabled($a_key)
 
determineOffsetAndOrder(bool $a_omit_offset=false)
 
setMaxCount(int $a_max_count)
set max. 
 
setFilterCols(int $a_val)
 
setExternalSegmentation(bool $a_val)
 
setPrefix(string $a_prefix)