ILIAS  release_7 Revision v7.30-3-g800a261c036
ilUserTableGUI Class Reference

TableGUI class for user administration. More...

+ Inheritance diagram for ilUserTableGUI:
+ Collaboration diagram for ilUserTableGUI:

Public Member Functions

 __construct ($a_parent_obj, $a_parent_cmd, $a_mode=self::MODE_USER_FOLDER, $a_load_items=true)
 Constructor. More...
 
 readUserDefinedFieldsDefinitions ()
 Read user defined fields definitions. More...
 
 getUserDefinedField ($a_key)
 Get user defined field. More...
 
 isUdfColumn ($a_key)
 Field key. More...
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 getItems ()
 Get user items. More...
 
 addFilterItemValue ($filter, $value)
 
 getUserIdsForFilter ()
 
 initFilter ()
 Init filter. More...
 
 addFilterItemByUdfType ($id, $type, $a_optional=false, $caption=null, $a_options=array())
 Add filter by standard type. More...
 
- Public Member Functions inherited from ilTable2GUI
 __construct ($a_parent_obj, $a_parent_cmd="", $a_template_context="")
 ilTable2GUI constructor. More...
 
 setOpenFormTag ($a_val)
 Set open form tag. More...
 
 getOpenFormTag ()
 Get open form tag. More...
 
 setCloseFormTag ($a_val)
 Set close form tag. More...
 
 getCloseFormTag ()
 Get close form tag. More...
 
 determineLimit ()
 Determine the limit. More...
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 determineSelectedColumns ()
 Determine selected columns. More...
 
 isColumnSelected ($a_col)
 Is given column selected? More...
 
 getSelectedColumns ()
 Get selected columns. More...
 
 executeCommand ()
 Execute command. More...
 
 resetOffset ($a_in_determination=false)
 Reset offset. More...
 
 initFilter ()
 Init filter. More...
 
 getParentObject ()
 Get parent object. More...
 
 getParentCmd ()
 Get parent command. More...
 
 setTopAnchor ($a_val)
 Set top anchor. More...
 
 getTopAnchor ()
 Get top anchor. More...
 
 setNoEntriesText ($a_text)
 Set text for an empty table. More...
 
 getNoEntriesText ()
 Get text for an empty table. More...
 
 setIsDataTable ($a_val)
 Set is data table. More...
 
 getIsDataTable ()
 Get is data table. More...
 
 setEnableTitle ($a_enabletitle)
 Set Enable Title. More...
 
 getEnableTitle ()
 Get Enable Title. More...
 
 setEnableHeader ($a_enableheader)
 Set Enable Header. More...
 
 getEnableHeader ()
 Get Enable Header. More...
 
 setEnableNumInfo ($a_val)
 Set enable num info. More...
 
 getEnableNumInfo ()
 Get enable num info. More...
 
 setTitle ($a_title, $a_icon=0, $a_icon_alt=0)
 Set title and title icon. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setOrderField ($a_order_field)
 set order column More...
 
 getOrderField ()
 
 setData ($a_data)
 set table data @access public More...
 
 getData ()
 
 dataExists ()
 
 setPrefix ($a_prefix)
 set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort separately) @access public More...
 
 getPrefix ()
 
 addFilterItem ($a_input_item, $a_optional=false)
 Add filter item. More...
 
 addFilterItemByMetaType ($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
 Add filter by standard type. More...
 
 getFilterItems ($a_optionals=false)
 Get filter items. More...
 
 getFilterItemByPostVar ($a_post_var)
 
 setFilterCols ($a_val)
 Set filter columns. More...
 
 getFilterCols ()
 Get filter columns. More...
 
 setDisableFilterHiding ($a_val=true)
 Set disable filter hiding. More...
 
 getDisableFilterHiding ()
 Get disable filter hiding. More...
 
 isFilterSelected ($a_col)
 Is given filter selected? More...
 
 getSelectedFilters ()
 Get selected filters. More...
 
 determineSelectedFilters ()
 Determine selected filters. More...
 
 setCustomPreviousNext ($a_prev_link, $a_next_link)
 Set custom previous/next links. More...
 
 setFormAction ($a_form_action, $a_multipart=false)
 Set Form action parameter. More...
 
 getFormAction ()
 Get Form action parameter. More...
 
 setFormName ($a_formname="")
 Set Form name. More...
 
 getFormName ()
 Get Form name. More...
 
 setId ($a_val)
 Set id. More...
 
 getId ()
 Get element id. More...
 
 setDisplayAsBlock ($a_val)
 Set display as block. More...
 
 getDisplayAsBlock ()
 Get display as block. More...
 
 getSelectAllCheckbox ()
 Get the name of the checkbox that should be toggled with a select all button. More...
 
 setSelectAllCheckbox ($a_select_all_checkbox, $a_select_all_on_top=false)
 Set the name of the checkbox that should be toggled with a select all button. More...
 
 setExternalSorting ($a_val)
 Set external sorting. More...
 
 getExternalSorting ()
 Get external sorting. More...
 
 setFilterCommand ($a_val, $a_caption=null)
 Set filter command. More...
 
 getFilterCommand ()
 Get filter command. More...
 
 setResetCommand ($a_val, $a_caption=null)
 Set reset filter command. More...
 
 getResetCommand ()
 Get reset filter command. More...
 
 setExternalSegmentation ($a_val)
 Set external segmentation. More...
 
 getExternalSegmentation ()
 Get external segmentation. More...
 
 setRowTemplate ($a_template, $a_template_dir="")
 Set row template. More...
 
 setDefaultOrderField ($a_defaultorderfield)
 Set Default order field. More...
 
 getDefaultOrderField ()
 Get Default order field. More...
 
 setDefaultOrderDirection ($a_defaultorderdirection)
 Set Default order direction. More...
 
 getDefaultOrderDirection ()
 Get Default order direction. More...
 
 setDefaultFilterVisiblity ($a_status)
 Set default filter visiblity. More...
 
 getDefaultFilterVisibility ()
 Get default filter visibility. More...
 
 clearCommandButtons ()
 
 addCommandButton ($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
 Add Command button. More...
 
 addCommandButtonInstance (ilButtonBase $a_button)
 Add Command button instance. More...
 
 addSelectionButton ($a_sel_var, $a_options, $a_cmd, $a_text, $a_default_selection='')
 Add Selection List + Command button. More...
 
 addMultiItemSelectionButton ($a_sel_var, $a_options, $a_cmd, $a_text, $a_default_selection='')
 Add Selection List + Command button for selected items. More...
 
 setCloseCommand ($a_link)
 Add command for closing table. More...
 
 addMultiCommand ($a_cmd, $a_text)
 Add Command button. More...
 
 addHiddenInput ($a_name, $a_value)
 Add Hidden Input field. More...
 
 addHeaderCommand ($a_href, $a_text, $a_target="", $a_img="")
 Add Header Command (Link) (Image needed for now) More...
 
 setTopCommands ($a_val)
 Set top commands (display command buttons on top of table, too) More...
 
 getTopCommands ()
 Get top commands (display command buttons on top of table, too) More...
 
 addColumn ( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
 Add a column to the header. More...
 
 getNavParameter ()
 
 setOrderLink ($sort_field, $order_dir)
 
 fillHeader ()
 
 determineOffsetAndOrder ($a_omit_offset=false)
 Determine offset and order. More...
 
 storeNavParameter ()
 
 getHTML ()
 Get HTML. More...
 
 numericOrdering ($a_field)
 Should this field be sorted numeric? More...
 
 render ()
 render table @access public More...
 
 writeFilterToSession ()
 Write filter values to session. More...
 
 resetFilter ()
 Reset filter. More...
 
 fillFooter ()
 Fill footer row. More...
 
 getLinkbar ($a_num)
 Get previous/next linkbar. More...
 
 fillHiddenRow ()
 
 fillActionRow ()
 Fill Action Row. More...
 
 setHeaderHTML ($html)
 set header html More...
 
 storeProperty ($type, $value)
 Store table property. More...
 
 loadProperty ($type)
 Load table property. More...
 
 getCurrentState ()
 get current settings for order, limit, columns and filter More...
 
 setContext ($id)
 Set context. More...
 
 getContext ()
 Get context. More...
 
 setShowRowsSelector ($a_value)
 Toggle rows-per-page selector. More...
 
 getShowRowsSelector ()
 Get rows-per-page selector state. More...
 
 setShowTemplates ($a_value)
 Toggle templates. More...
 
 getShowTemplates ()
 Get template state. More...
 
 restoreTemplate ($a_name)
 Restore state from template. More...
 
 saveTemplate ($a_name)
 Save current state as template. More...
 
 deleteTemplate ($a_name)
 Delete template. More...
 
 getLimit ()
 Get limit. More...
 
 getOffset ()
 Get offset. More...
 
 setExportFormats (array $formats)
 Set available export formats. More...
 
 setPrintMode ($a_value=false)
 Toogle print mode. More...
 
 getPrintMode ()
 Get print mode. More...
 
 getExportMode ()
 Was export activated? More...
 
 exportData ($format, $send=false)
 Export and optionally send current table data. More...
 
 setEnableAllCommand ($a_value)
 Enable actions for all entries in current result. More...
 
 setRowSelectorLabel ($row_selector_label)
 
 getRowSelectorLabel ()
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 setLimit ($a_limit=0, $a_default_limit=0)
 set max. More...
 
- Public Member Functions inherited from ilTableGUI
 __construct ($a_data=0, $a_global_tpl=true)
 Constructor. More...
 
 setTemplate ($a_tpl)
 set template @access public More...
 
getTemplateObject ()
 
 setData ($a_data)
 set table data @access public More...
 
 getData ()
 
 setTitle ($a_title, $a_icon=0, $a_icon_alt=0)
 set table title @access public More...
 
 setHelp ($a_help_page, $a_help_icon, $a_help_icon_alt=0)
 set table help page @access public More...
 
 setHeaderNames ($a_header_names)
 set table header names @access public More...
 
 getColumnCount ()
 Returns the column count based on the number of the header row columns @access public. More...
 
 setHeaderVars ($a_header_vars, $a_header_params=0)
 set table header vars @access public More...
 
 setColumnWidth ($a_column_width)
 set table column widths @access public More...
 
 setOneColumnWidth ($a_column_width, $a_column_number)
 set one table column width @access public More...
 
 setMaxCount ($a_max_count)
 set max. More...
 
 setLimit ($a_limit=0, $a_default_limit=0)
 set max. More...
 
 getLimit ()
 Get limit. More...
 
 setPrefix ($a_prefix)
 set prefix for sort and offset fields (if you have two or more tables on a page that you want to sort separately) @access public More...
 
 setOffset ($a_offset)
 set dataset offset @access public More...
 
 getOffset ()
 Get offset. More...
 
 setOrderColumn ($a_order_column=0, $a_default_column=0)
 set order column @access public More...
 
 getOrderColumn ()
 Get order column. More...
 
 setOrderDirection ($a_order_direction)
 set order direction @access public More...
 
 getOrderDirection ()
 Get order direction. More...
 
 setFooter ($a_style, $a_previous=0, $a_next=0)
 set order direction @access public More...
 
 enable ($a_module_name)
 enables particular modules of table More...
 
 disable ($a_module_name)
 diesables particular modules of table More...
 
 sortData ()
 
 render ()
 render table @access public More...
 
 renderHeader ()
 
 setOrderLink ($key, $order_dir)
 
 setStyle ($a_element, $a_style)
 
 getStyle ($a_element)
 
 setBase ($a_base)
 Set Base script name (deprecated, only use this for workarounds). More...
 
 getBase ()
 Get Base script name (deprecated, only use this for workarounds). More...
 
 getFormName ()
 
 setFormName ($a_name="cmd")
 
 getSelectAllCheckbox ()
 
 setSelectAllCheckbox ($a_select_all_checkbox)
 
 clearActionButtons ()
 
 addActionButton ($btn_name, $btn_value)
 

Data Fields

const MODE_USER_FOLDER = 1
 
const MODE_LOCAL_USER = 2
 
- Data Fields inherited from ilTable2GUI
const FILTER_TEXT = 1
 
const FILTER_SELECT = 2
 
const FILTER_DATE = 3
 
const FILTER_LANGUAGE = 4
 
const FILTER_NUMBER_RANGE = 5
 
const FILTER_DATE_RANGE = 6
 
const FILTER_DURATION_RANGE = 7
 
const FILTER_DATETIME_RANGE = 8
 
const FILTER_CHECKBOX = 9
 
const EXPORT_EXCEL = 1
 
const EXPORT_CSV = 2
 
const ACTION_ALL_LIMIT = 1000
 
- Data Fields inherited from ilTableGUI
 $title
 
 $icon
 
 $icon_alt
 
 $help_page
 
 $help_icon
 
 $help_icon_alt
 
 $header_names
 
 $header_vars
 
 $linkbar_vars
 
 $data
 
 $column_count
 
 $column_width
 
 $max_count
 
 $limit
 
 $max_limit = false
 
 $offset
 
 $order_column
 
 $order_direction
 
 $footer_style
 
 $footer_previous
 
 $footer_next
 
 $lang_support = true
 
 $global_tpl
 
 $form_name
 
 $select_all_checkbox
 
 $action_buttons
 
 $prefix
 
 $base = ""
 
 $enabled
 
 $styles
 

Protected Member Functions

 setMode ($a_mode)
 
 getMode ()
 
 getUserFolderId ()
 
 fillRow ($user)
 Fill table row. More...
 
- Protected Member Functions inherited from ilTable2GUI
 prepareOutput ()
 Anything that must be done before HTML is generated. More...
 
 isFilterVisible ()
 Check if filter is visible: manually shown (session, db) or default value set. More...
 
 isAdvMDFilter (ilAdvancedMDRecordGUI $a_gui, $a_element)
 Check if filter element is based on adv md. More...
 
 fillRow ($a_set)
 Standard Version of Fill Row. More...
 
 getFilterValue (ilFormPropertyGUI $a_item)
 Get current filter value. More...
 
 SetFilterValue (ilFormPropertyGUI $a_item, $a_value)
 Set current filter value. More...
 
 fillMetaExcel (ilExcel $a_excel, &$a_row)
 Add meta information to excel export. More...
 
 fillHeaderExcel (ilExcel $a_excel, &$a_row)
 Excel Version of Fill Header. More...
 
 fillRowExcel (ilExcel $a_excel, &$a_row, $a_set)
 Excel Version of Fill Row. More...
 
 fillMetaCSV ($a_csv)
 Add meta information to csv export. More...
 
 fillHeaderCSV ($a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV ($a_csv, $a_set)
 CSV Version of Fill Row. More...
 

Protected Attributes

 $udf_fields = array()
 
 $filter = array()
 
- Protected Attributes inherited from ilTable2GUI
 $ctrl
 
 $tpl
 
 $parent_obj
 
 $parent_cmd
 
 $close_command = ""
 
 $top_anchor = "il_table_top"
 
 $filters = array()
 
 $optional_filters = array()
 
 $filter_cmd = 'applyFilter'
 
 $reset_cmd = 'resetFilter'
 
 $filter_cols = 5
 
 $ext_sort = false
 
 $ext_seg = false
 
 $context = ""
 
 $mi_sel_buttons = []
 
 $disable_filter_hiding = false
 
 $selected_filter = false
 
 $top_commands = true
 
 $selectable_columns = array()
 
 $selected_column = array()
 
 $show_templates = false
 
 $show_rows_selector = true
 
 $rows_selector_off = false
 
 $nav_determined = false
 
 $limit_determined = false
 
 $filters_determined = false
 
 $columns_determined = false
 
 $open_form_tag = true
 
 $close_form_tag = true
 
 $export_formats = []
 
 $export_mode
 
 $print_mode
 
 $enable_command_for_all
 
 $restore_filter
 
 $restore_filter_values
 
 $default_filter_visibility = false
 
 $sortable_fields = array()
 
 $prevent_double_submission = true
 
 $row_selector_label
 
 $select_all_on_top = false
 
 $sel_buttons = []
 
- Protected Attributes inherited from ilTableGUI
 $tpl
 
 $lng
 

Private Attributes

 $mode = null
 
 $user_folder_id = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 Get maximum number of entries to enable actions for all. More...
 

Detailed Description

TableGUI class for user administration.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilUserTableGUI: ilFormPropertyDispatchGUI

Definition at line 15 of file class.ilUserTableGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilUserTableGUI::__construct (   $a_parent_obj,
  $a_parent_cmd,
  $a_mode = self::MODE_USER_FOLDER,
  $a_load_items = true 
)

Constructor.

Definition at line 34 of file class.ilUserTableGUI.php.

35 {
36 global $DIC;
37
38 $ilCtrl = $DIC->ctrl();
39 $lng = $DIC->language();
40
41 $this->user_folder_id = $a_parent_obj->object->getRefId();
42
43 if ($DIC['rbacsystem']->checkAccess('write', $this->user_folder_id)
44 || $DIC['rbacsystem']->checkAccess('cat_administrate_users', $this->user_folder_id)) {
45 $this->with_write_access = true;
46 }
47
48 $this->setMode($a_mode);
49 $this->setId("user" . $this->getUserFolderId());
51
52 parent::__construct($a_parent_obj, $a_parent_cmd);
53 // $this->setTitle($this->lng->txt("users"));
54
55 $this->addColumn("", "", "1", true);
56 $this->addColumn($this->lng->txt("login"), "login");
57
58 foreach ($this->getSelectedColumns() as $c) {
59 if ($this->isUdfColumn($c)) {
60 $f = $this->getUserDefinedField($c);
61 $this->addColumn($f["txt"], $f["sortable"] ? $c : "");
62 } else { // usual column
63 $this->addColumn($this->lng->txt($c), $c);
64 }
65 }
66
67 if ($this->getMode() == self::MODE_LOCAL_USER) {
68 $this->addColumn($this->lng->txt('context'), 'time_limit_owner');
69 $this->addColumn($this->lng->txt('role_assignment'));
70 }
71
72 $this->setShowRowsSelector(true);
73 $this->setExternalSorting(true);
74 $this->setExternalSegmentation(true);
75 $this->setEnableHeader(true);
76
77 $this->setFormAction($ilCtrl->getFormAction($this->parent_obj, "applyFilter"));
78 $this->setRowTemplate("tpl.user_list_row.html", "Services/User");
79 $this->setEnableTitle(true);
80 $this->initFilter();
81 $this->setFilterCommand("applyFilter");
82 $this->setDefaultOrderField("login");
83 $this->setDefaultOrderDirection("asc");
84
85 $this->setSelectAllCheckbox("id[]");
86 $this->setTopCommands(true);
87
88
89 if ($this->getMode() == self::MODE_USER_FOLDER) {
90 $this->setEnableAllCommand(true);
91
92 $cmds = $a_parent_obj->getUserMultiCommands();
93 foreach ($cmds as $cmd => $caption) {
94 $this->addMultiCommand($cmd, $caption);
95 }
96 } else {
97 $this->addMultiCommand("deleteUsers", $lng->txt("delete"));
98 }
99
100 if ($a_load_items) {
101 $this->getItems();
102 }
103 }
getSelectedColumns()
Get selected columns.
setTopCommands($a_val)
Set top commands (display command buttons on top of table, too)
setEnableHeader($a_enableheader)
Set Enable Header.
setExternalSorting($a_val)
Set external sorting.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
setEnableAllCommand($a_value)
Enable actions for all entries in current result.
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setExternalSegmentation($a_val)
Set external segmentation.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
readUserDefinedFieldsDefinitions()
Read user defined fields definitions.
getUserDefinedField($a_key)
Get user defined field.
initFilter()
Init filter.
getItems()
Get user items.
isUdfColumn($a_key)
Field key.
$c
Definition: cli.php:37
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $c, $DIC, Vendor\Package\$f, ilTableGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), ilTable2GUI\addColumn(), ilTable2GUI\addMultiCommand(), getItems(), getMode(), ilTable2GUI\getSelectedColumns(), getUserDefinedField(), getUserFolderId(), initFilter(), isUdfColumn(), readUserDefinedFieldsDefinitions(), ilTable2GUI\setDefaultOrderDirection(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setEnableAllCommand(), ilTable2GUI\setEnableHeader(), ilTable2GUI\setEnableTitle(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setFilterCommand(), ilTable2GUI\setFormAction(), ilTable2GUI\setId(), setMode(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setSelectAllCheckbox(), ilTable2GUI\setShowRowsSelector(), and ilTable2GUI\setTopCommands().

+ Here is the call graph for this function:

Member Function Documentation

◆ addFilterItemByUdfType()

ilUserTableGUI::addFilterItemByUdfType (   $id,
  $type,
  $a_optional = false,
  $caption = null,
  $a_options = array() 
)

Add filter by standard type.

Parameters
string$id
int$type
bool$a_optional
string$caption
Returns
object

Definition at line 603 of file class.ilUserTableGUI.php.

604 {
605 global $DIC;
606
607 $lng = $DIC['lng'];
608
609 if (!$caption) {
610 $caption = $lng->txt($id);
611 }
612
613 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
614
615 switch ($type) {
616 case UDF_TYPE_SELECT:
617 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
618 $item = new ilSelectInputGUI($caption, $id);
619 $sel_options = array("" => $this->lng->txt("user_all"));
620 foreach ($a_options as $o) {
621 $sel_options[$o] = $o;
622 }
623 $item->setOptions($sel_options);
624 break;
625
626 case UDF_TYPE_TEXT:
627 include_once("./Services/Form/classes/class.ilTextInputGUI.php");
628 $item = new ilTextInputGUI($caption, $id);
629 $item->setMaxLength(64);
630 $item->setSize(20);
631 // $item->setSubmitFormOnEnter(true);
632 break;
633
634 default:
635 return null;
636 }
637
638 if ($item) {
639 $this->addFilterItem($item, $a_optional);
640 $item->readFromSession();
641 $this->filter[$id] = $item->getValue();
642 }
643 return $item;
644 }
const UDF_TYPE_SELECT
const UDF_TYPE_TEXT
This class represents a selection list property in a property form.
addFilterItem($a_input_item, $a_optional=false)
Add filter item.
This class represents a text property in a property form.
filter()
Definition: filter.php:2
$type

References $DIC, ilTableGUI\$lng, $type, ilTable2GUI\addFilterItem(), filter(), UDF_TYPE_SELECT, and UDF_TYPE_TEXT.

Referenced by initFilter().

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

◆ addFilterItemValue()

ilUserTableGUI::addFilterItemValue (   $filter,
  $value 
)

Definition at line 374 of file class.ilUserTableGUI.php.

375 {
376 $this->filter[$filter] = $value;
377 }

References $filter, and filter().

+ Here is the call graph for this function:

◆ fillRow()

ilUserTableGUI::fillRow (   $user)
protected

Fill table row.

Reimplemented from ilTable2GUI.

Definition at line 649 of file class.ilUserTableGUI.php.

650 {
651 global $DIC;
652
653 $ilCtrl = $DIC['ilCtrl'];
654 $lng = $DIC['lng'];
655
656 $ilCtrl->setParameterByClass("ilobjusergui", "letter", $_GET["letter"]);
657
658 foreach ($this->getSelectedColumns() as $c) {
659 if ($c == "access_until") {
660 $this->tpl->setCurrentBlock("access_until");
661 $this->tpl->setVariable("VAL_ACCESS_UNTIL", $user["access_until"]);
662 $this->tpl->setVariable("CLASS_ACCESS_UNTIL", $user["access_class"]);
663 } elseif ($c == "last_login") {
664 $this->tpl->setCurrentBlock("last_login");
665 $this->tpl->setVariable(
666 "VAL_LAST_LOGIN",
668 );
669 } elseif (in_array($c, array("firstname", "lastname"))) {
670 $this->tpl->setCurrentBlock($c);
671 $this->tpl->setVariable("VAL_" . strtoupper($c), (string) $user[$c]);
672 } elseif ($c == 'auth_mode') {
673 $this->tpl->setCurrentBlock('user_field');
674 $this->tpl->setVariable('VAL_UF', ilAuthUtils::getAuthModeTranslation(ilAuthUtils::_getAuthMode($user['auth_mode'])));
675 $this->tpl->parseCurrentBlock();
676 } else { // all other fields
677 $this->tpl->setCurrentBlock("user_field");
678 $val = (trim($user[$c]) == "")
679 ? " "
680 : $user[$c];
681 if ($user[$c] != "") {
682 switch ($c) {
683 case "birthday":
685 break;
686
687 case "gender":
688 $val = $lng->txt("gender_" . $user[$c]);
689 break;
690
691 case "create_date":
692 case "agree_date":
693 case "approve_date":
694 // $val = ilDatePresentation::formatDate(new ilDateTime($val,IL_CAL_DATETIME));
696 break;
697 }
698 }
699 $this->tpl->setVariable("VAL_UF", $val);
700 }
701
702 $this->tpl->parseCurrentBlock();
703 }
704
705 if ($user["usr_id"] != 6
706 && ($this->getMode() == self::MODE_USER_FOLDER || $user['time_limit_owner'] == $this->getUserFolderId())) {
707 $this->tpl->setCurrentBlock("checkb");
708 $this->tpl->setVariable("ID", $user["usr_id"]);
709 $this->tpl->parseCurrentBlock();
710 }
711
712 if ($this->with_write_access
713 && ($this->getMode() == self::MODE_USER_FOLDER
714 || $user['time_limit_owner'] == $this->getUserFolderId())) {
715 $this->tpl->setVariable("VAL_LOGIN", $user["login"]);
716 $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", $user["usr_id"]);
717 $this->tpl->setVariable(
718 "HREF_LOGIN",
719 $ilCtrl->getLinkTargetByClass("ilobjusergui", "view")
720 );
721 $ilCtrl->setParameterByClass("ilobjusergui", "obj_id", "");
722 } else {
723 $this->tpl->setVariable('VAL_LOGIN_PLAIN', $user['login']);
724 }
725
726 if ($this->getMode() == self::MODE_LOCAL_USER) {
727 $this->tpl->setCurrentBlock('context');
728 $this->tpl->setVariable('VAL_CONTEXT', (string) ilObject::_lookupTitle(ilObject::_lookupObjId($user['time_limit_owner'])));
729 $this->tpl->parseCurrentBlock();
730
731 $this->tpl->setCurrentBlock('roles');
732 $ilCtrl->setParameter($this->getParentObject(), 'obj_id', $user['usr_id']);
733 $this->tpl->setVariable('ROLE_LINK', $ilCtrl->getLinkTarget($this->getParentObject(), 'assignRoles'));
734 $this->tpl->setVariable('TXT_ROLES', $this->lng->txt('edit'));
735 $ilCtrl->clearParameters($this->getParentObject());
736 $this->tpl->parseCurrentBlock();
737 }
738 }
$_GET["client_id"]
const IL_CAL_DATE
const IL_CAL_DATETIME
static getAuthModeTranslation($a_auth_key, $auth_name='')
static _getAuthMode($a_auth_mode, $a_db_handler='')
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
Class for single dates.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getParentObject()
Get parent object.

References $_GET, $c, $DIC, ilTableGUI\$lng, ilAuthUtils\_getAuthMode(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilDatePresentation\formatDate(), ilAuthUtils\getAuthModeTranslation(), getMode(), ilTable2GUI\getParentObject(), ilTable2GUI\getSelectedColumns(), getUserFolderId(), IL_CAL_DATE, and IL_CAL_DATETIME.

+ Here is the call graph for this function:

◆ getItems()

ilUserTableGUI::getItems ( )

Get user items.

Definition at line 263 of file class.ilUserTableGUI.php.

264 {
265 global $DIC;
266
267 $lng = $DIC['lng'];
268
270 if ($this->getMode() == self::MODE_USER_FOLDER) {
271 // All accessible users
272 include_once './Services/User/classes/class.ilLocalUser.php';
273 $user_filter = ilLocalUser::_getFolderIds(true);
274 } else {
275 if ($this->filter['time_limit_owner']) {
276 $user_filter = array($this->filter['time_limit_owner']);
277 } else {
278 // All accessible users
279 include_once './Services/User/classes/class.ilLocalUser.php';
280 $user_filter = ilLocalUser::_getFolderIds();
281 }
282 }
283
284
285
286 //#13221 don't show all users if user filter is empty!
287 if (!count($user_filter)) {
288 $this->setMaxCount(0);
289 $this->setData([]);
290 return;
291 }
292
293 if (is_array($this->filter['user_ids']) && !count($this->filter['user_ids'])) {
294 $this->setMaxCount(0);
295 $this->setData([]);
296 return;
297 }
298
299 $additional_fields = $this->getSelectedColumns();
300 unset($additional_fields["firstname"]);
301 unset($additional_fields["lastname"]);
302 unset($additional_fields["email"]);
303 unset($additional_fields["second_email"]);
304 unset($additional_fields["last_login"]);
305 unset($additional_fields["access_until"]);
306 unset($additional_fields['org_units']);
307
308 $udf_filter = array();
309 foreach ($this->filter as $k => $v) {
310 if (substr($k, 0, 4) == "udf_") {
311 $udf_filter[$k] = $v;
312 }
313 }
314
315 $query = new ilUserQuery();
316 $order_field = $this->getOrderField();
317 if (substr($order_field, 0, 4) != "udf_" || isset($additional_fields[$order_field])) {
318 $query->setOrderField($order_field);
319 $query->setOrderDirection($this->getOrderDirection());
320 }
321 $query->setOffset($this->getOffset());
322 $query->setLimit($this->getLimit());
323 $query->setTextFilter($this->filter['query']);
324 $query->setActionFilter($this->filter['activation']);
325 $query->setLastLogin($this->filter['last_login']);
326 $query->setLimitedAccessFilter($this->filter['limited_access']);
327 $query->setNoCourseFilter($this->filter['no_courses']);
328 $query->setNoGroupFilter($this->filter['no_groups']);
329 $query->setCourseGroupFilter($this->filter['course_group']);
330 $query->setRoleFilter($this->filter['global_role']);
331 $query->setAdditionalFields($additional_fields);
332 $query->setUserFolder($user_filter);
333 $query->setUserFilter($this->filter['user_ids']);
334 $query->setUdfFilter($udf_filter);
335 $query->setFirstLetterLastname(ilUtil::stripSlashes($_GET['letter']));
336 $query->setAuthenticationFilter($this->filter['authentication']);
337 $usr_data = $query->query();
338
339 if (count($usr_data["set"]) == 0 && $this->getOffset() > 0) {
340 $this->resetOffset();
341 $query->setOffset($this->getOffset());
342 $usr_data = $query->query();
343 }
344
345 foreach ($usr_data["set"] as $k => $user) {
346 if (in_array('org_units', $this->getSelectedColumns())) {
347 $usr_data['set'][$k]['org_units'] = ilObjUser::lookupOrgUnitsRepresentation($user['usr_id']);
348 }
349
350
351 $current_time = time();
352 if ($user['active']) {
353 if ($user["time_limit_unlimited"]) {
354 $txt_access = $lng->txt("access_unlimited");
355 $usr_data["set"][$k]["access_class"] = "smallgreen";
356 } elseif ($user["time_limit_until"] < $current_time) {
357 $txt_access = $lng->txt("access_expired");
358 $usr_data["set"][$k]["access_class"] = "smallred";
359 } else {
360 $txt_access = ilDatePresentation::formatDate(new ilDateTime($user["time_limit_until"], IL_CAL_UNIX));
361 $usr_data["set"][$k]["access_class"] = "small";
362 }
363 } else {
364 $txt_access = $lng->txt("inactive");
365 $usr_data["set"][$k]["access_class"] = "smallred";
366 }
367 $usr_data["set"][$k]["access_until"] = $txt_access;
368 }
369
370 $this->setMaxCount($usr_data["cnt"]);
371 $this->setData($usr_data["set"]);
372 }
const IL_CAL_UNIX
static _getFolderIds($access_with_orgunit=false)
static lookupOrgUnitsRepresentation($a_usr_id)
lokup org unit representation
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
setData($a_data)
set table data @access public
getLimit()
Get limit.
resetOffset($a_in_determination=false)
Reset offset.
getOffset()
Get offset.
getOrderDirection()
Get order direction.
setMaxCount($a_max_count)
set max.
User query class.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$query

References $_GET, $DIC, ilTableGUI\$lng, $query, ilLocalUser\_getFolderIds(), ilTable2GUI\determineOffsetAndOrder(), filter(), ilDatePresentation\formatDate(), ilTable2GUI\getLimit(), getMode(), ilTable2GUI\getOffset(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), ilTable2GUI\getSelectedColumns(), IL_CAL_UNIX, ilObjUser\lookupOrgUnitsRepresentation(), ilTable2GUI\resetOffset(), ilTable2GUI\setData(), ilTableGUI\setMaxCount(), and ilUtil\stripSlashes().

Referenced by __construct().

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

◆ getMode()

ilUserTableGUI::getMode ( )
protected

Definition at line 110 of file class.ilUserTableGUI.php.

111 {
112 return $this->mode;
113 }

References $mode.

Referenced by __construct(), fillRow(), getItems(), getSelectableColumns(), getUserIdsForFilter(), and initFilter().

+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilUserTableGUI::getSelectableColumns ( )

Get selectable columns.

Parameters

return

LTI, showing depending by mode user?

Reimplemented from ilTable2GUI.

Definition at line 171 of file class.ilUserTableGUI.php.

172 {
173 global $DIC;
174
175 $lng = $DIC['lng'];
176
177 include_once("./Services/User/classes/class.ilUserProfile.php");
178 $up = new ilUserProfile();
179 $up->skipGroup("preferences");
180 $up->skipGroup("interests");
181 $up->skipGroup("settings");
182
183 // default fields
184 $cols = array();
185
186 // first and last name cannot be hidden
187 $cols["firstname"] = array(
188 "txt" => $lng->txt("firstname"),
189 "default" => true);
190 $cols["lastname"] = array(
191 "txt" => $lng->txt("lastname"),
192 "default" => true);
193 if ($this->getMode() == self::MODE_USER_FOLDER) {
194 $ufs = $up->getStandardFields();
195
196 $cols["access_until"] = array(
197 "txt" => $lng->txt("access_until"),
198 "default" => true);
199 $cols["last_login"] = array(
200 "txt" => $lng->txt("last_login"),
201 "default" => true);
202
203 // #13967
204 $cols["create_date"] = array(
205 "txt" => $lng->txt("create_date"));
206 $cols["approve_date"] = array(
207 "txt" => $lng->txt("approve_date"));
208 $cols["agree_date"] = array(
209 "txt" => $lng->txt("agree_date"));
210 } else {
211 $ufs = $up->getLocalUserAdministrationFields();
212 }
213
214 // email should be the 1st "optional" field (can be hidden)
215 if (isset($ufs["email"])) {
216 $cols["email"] = array(
217 "txt" => $lng->txt("email"),
218 "default" => true);
219 }
220 if (isset($ufs["second_email"])) {
221 $cols["second_email"] = array(
222 "txt" => $lng->txt("second_email"),
223 "default" => true);
224 }
225 // other user profile fields
226 foreach ($ufs as $f => $fd) {
227 if (!isset($cols[$f]) && !$fd["lists_hide"]) {
228 // #18795
229 $caption = $fd["lang_var"]
230 ? $fd["lang_var"]
231 : $f;
232 $cols[$f] = array(
233 "txt" => $lng->txt($caption),
234 "default" => false);
235 }
236 }
237
238
242 $cols["auth_mode"] = array(
243 "txt" => $lng->txt("auth_mode"),
244 "default" => false);
245
246
247 // custom user fields
248 if ($this->getMode() == self::MODE_USER_FOLDER) {
249 foreach ($this->udf_fields as $k => $field) {
250 $cols[$k] = $field;
251 }
252 }
253
254 // fields that are always shown
255 unset($cols["username"]);
256
257 return $cols;
258 }
Class ilUserProfile.
$cols
Definition: xhr_table.php:11

References $cols, $DIC, Vendor\Package\$f, ilTableGUI\$lng, and getMode().

+ Here is the call graph for this function:

◆ getUserDefinedField()

ilUserTableGUI::getUserDefinedField (   $a_key)

Get user defined field.

Parameters
string$a_keyfield key
Returns
array

Definition at line 143 of file class.ilUserTableGUI.php.

144 {
145 if (isset($this->udf_fields[$a_key])) {
146 return $this->udf_fields[$a_key];
147 }
148 return array();
149 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ getUserFolderId()

ilUserTableGUI::getUserFolderId ( )
protected

Definition at line 115 of file class.ilUserTableGUI.php.

116 {
118 }

References $user_folder_id.

Referenced by __construct(), fillRow(), and initFilter().

+ Here is the caller graph for this function:

◆ getUserIdsForFilter()

ilUserTableGUI::getUserIdsForFilter ( )

Definition at line 379 of file class.ilUserTableGUI.php.

380 {
381 if ($this->getMode() == self::MODE_USER_FOLDER) {
382 // All accessible users
383 include_once './Services/User/classes/class.ilLocalUser.php';
384 $user_filter = ilLocalUser::_getFolderIds(true);
385 } else {
386 if ($this->filter['time_limit_owner']) {
387 $user_filter = array($this->filter['time_limit_owner']);
388 } else {
389 // All accessible users
390 include_once './Services/User/classes/class.ilLocalUser.php';
391 $user_filter = ilLocalUser::_getFolderIds();
392 }
393 }
394
395 if (!isset($this->filter['user_ids'])) {
396 $this->filter['user_ids'] = array();
397 $this->filter['user_ids'] = null;
398 }
399
400 include_once("./Services/User/classes/class.ilUserQuery.php");
401 $query = new ilUserQuery();
402 $query->setOffset($this->getOffset());
403 $query->setLimit($this->getLimit());
404
405 $query->setTextFilter($this->filter['query']);
406 $query->setActionFilter($this->filter['activation']);
407 $query->setAuthenticationFilter($this->filter['authentication']);
408 $query->setLastLogin($this->filter['last_login']);
409 $query->setLimitedAccessFilter($this->filter['limited_access']);
410 $query->setNoCourseFilter($this->filter['no_courses']);
411 $query->setNoGroupFilter($this->filter['no_groups']);
412 $query->setCourseGroupFilter($this->filter['course_group']);
413 $query->setRoleFilter($this->filter['global_role']);
414 $query->setUserFolder($user_filter);
415 $query->setUserFilter($this->filter['user_ids']);
416 $query->setFirstLetterLastname(ilUtil::stripSlashes($_GET['letter']));
417
418 if ($this->getOrderField()) {
419 $query->setOrderField(ilUtil::stripSlashes($this->getOrderField()));
420 $query->setOrderDirection(ilUtil::stripSlashes($this->getOrderDirection()));
421 }
422
423 $usr_data = $query->query();
424 $user_ids = array();
425
426 foreach ($usr_data["set"] as $item) {
427 // #11632
428 if ($item["usr_id"] != SYSTEM_USER_ID) {
429 $user_ids[] = $item["usr_id"];
430 }
431 }
432 return $user_ids;
433 }
const SYSTEM_USER_ID
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: constants.php:24

References $_GET, $query, ilLocalUser\_getFolderIds(), filter(), ilTable2GUI\getLimit(), getMode(), ilTable2GUI\getOffset(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), ilUtil\stripSlashes(), and SYSTEM_USER_ID.

+ Here is the call graph for this function:

◆ initFilter()

ilUserTableGUI::initFilter ( )

Init filter.

Reimplemented from ilTable2GUI.

Definition at line 439 of file class.ilUserTableGUI.php.

440 {
441 global $DIC;
442
443 $lng = $DIC['lng'];
444 $rbacreview = $DIC['rbacreview'];
445 $ilUser = $DIC['ilUser'];
446 $ilCtrl = $DIC['ilCtrl'];
447
448
449 // Show context filter
450 if ($this->getMode() == self::MODE_LOCAL_USER) {
451 include_once './Services/User/classes/class.ilLocalUser.php';
452 $parent_ids = ilLocalUser::_getFolderIds();
453
454 if (count($parent_ids) > 1) {
455 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
456 $co = new ilSelectInputGUI($lng->txt('context'), 'time_limit_owner');
457
458 $ref_id = $this->getUserFolderId();
459
460 $opt[0] = $this->lng->txt('all_users');
461 $opt[$this->getUserFolderId()] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($this->getUserFolderId())) . ')';
462
463 foreach ($parent_ids as $parent_id) {
464 if ($parent_id == $this->getUserFolderId()) {
465 continue;
466 }
467 switch ($parent_id) {
468 case USER_FOLDER_ID:
469 $opt[USER_FOLDER_ID] = $lng->txt('global_user');
470 break;
471
472 default:
473 $opt[$parent_id] = $lng->txt('users') . ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($parent_id)) . ')';
474 break;
475 }
476 }
477 $co->setOptions($opt);
478 $this->addFilterItem($co);
479 $co->readFromSession();
480 $this->filter['time_limit_owner'] = $co->getValue();
481 }
482 }
483
484 // User name, login, email filter
485 include_once("./Services/Form/classes/class.ilTextInputGUI.php");
486 $ul = new ilTextInputGUI($lng->txt("login") . "/" . $lng->txt("email") . "/" .
487 $lng->txt("name"), "query");
488 $ul->setDataSource($ilCtrl->getLinkTarget(
489 $this->getParentObject(),
490 "addUserAutoComplete",
491 "",
492 true
493 ));
494 $ul->setSize(20);
495 $ul->setSubmitFormOnEnter(true);
496 $this->addFilterItem($ul);
497 $ul->readFromSession();
498 $this->filter["query"] = $ul->getValue();
499
500 // activation
501 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
502 $options = array(
503 "" => $lng->txt("user_all"),
504 "active" => $lng->txt("active"),
505 "inactive" => $lng->txt("inactive"),
506 );
507 $si = new ilSelectInputGUI($this->lng->txt("user_activation"), "activation");
508 $si->setOptions($options);
509 $this->addFilterItem($si);
510 $si->readFromSession();
511 $this->filter["activation"] = $si->getValue();
512
513 // limited access
514 include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
515 $cb = new ilCheckboxInputGUI($this->lng->txt("user_limited_access"), "limited_access");
516 $this->addFilterItem($cb);
517 $cb->readFromSession();
518 $this->filter["limited_access"] = $cb->getChecked();
519
520 // last login
521 include_once("./Services/Form/classes/class.ilDateTimeInputGUI.php");
522 $di = new ilDateTimeInputGUI($this->lng->txt("user_last_login_before"), "last_login");
523 $default_date = new ilDateTime(time(), IL_CAL_UNIX);
524 $default_date->increment(IL_CAL_DAY, 1);
525 $di->setDate($default_date);
526 $this->addFilterItem($di);
527 $di->readFromSession();
528 $this->filter["last_login"] = $di->getDate();
529
530 if ($this->getMode() == self::MODE_USER_FOLDER) {
531 // no assigned courses
532 include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
533 $cb = new ilCheckboxInputGUI($this->lng->txt("user_no_courses"), "no_courses");
534 $this->addFilterItem($cb);
535 $cb->readFromSession();
536 $this->filter["no_courses"] = $cb->getChecked();
537
538 // no assigned groups
539 include_once("./Services/Form/classes/class.ilCheckboxInputGUI.php");
540 $ng = new ilCheckboxInputGUI($this->lng->txt("user_no_groups"), "no_groups");
541 $this->addFilterItem($ng);
542 $ng->readFromSession();
543 $this->filter['no_groups'] = $ng->getChecked();
544
545 // course/group members
546 include_once("./Services/Form/classes/class.ilRepositorySelectorInputGUI.php");
547 $rs = new ilRepositorySelectorInputGUI($lng->txt("user_member_of_course_group"), "course_group");
548 $rs->setSelectText($lng->txt("user_select_course_group"));
549 $rs->setHeaderMessage($lng->txt("user_please_select_course_group"));
550 $rs->setClickableTypes(array("crs", "grp"));
551 $this->addFilterItem($rs);
552 $rs->readFromSession();
553 $this->filter["course_group"] = $rs->getValue();
554 }
555
556 // global roles
557 $options = array(
558 "" => $lng->txt("user_any"),
559 );
560 $roles = $rbacreview->getRolesByFilter(2, $ilUser->getId());
561 foreach ($roles as $role) {
562 $options[$role["rol_id"]] = $role["title"];
563 }
564 $si = new ilSelectInputGUI($this->lng->txt("user_global_role"), "global_role");
565 $si->setOptions($options);
566 $this->addFilterItem($si);
567 $si->readFromSession();
568 $this->filter["global_role"] = $si->getValue();
569
570 // authentication mode
571 $auth_methods = ilAuthUtils::_getActiveAuthModes();
572 $options = array(
573 "" => $lng->txt("user_any"),
574 );
575 foreach ($auth_methods as $method => $value) {
576 if ($method == 'default') {
577 $options[$method] = $this->lng->txt('auth_' . $method) . " (" . $this->lng->txt('auth_' . ilAuthUtils::_getAuthModeName($value)) . ")";
578 } else {
579 $options[$method] = ilAuthUtils::getAuthModeTranslation($value);
580 }
581 }
582 $si = new ilSelectInputGUI($this->lng->txt("auth_mode"), "authentication_method");
583 $si->setOptions($options);
584 $this->addFilterItem($si);
585 $si->readFromSession();
586 $this->filter["authentication"] = $si->getValue();
587
588 // udf fields
589 foreach ($this->udf_fields as $id => $f) {
590 $this->addFilterItemByUdfType($id, $f["type"], true, $f["txt"], $f["options"]);
591 }
592 }
const IL_CAL_DAY
static _getActiveAuthModes()
static _getAuthModeName($a_auth_key)
This class represents a checkbox property in a property form.
This class represents a date/time property in a property form.
This class represents a repository selector in a property form.
addFilterItemByUdfType($id, $type, $a_optional=false, $caption=null, $a_options=array())
Add filter by standard type.
const USER_FOLDER_ID
Definition: constants.php:31
$ilUser
Definition: imgupload.php:18

References $DIC, Vendor\Package\$f, $ilUser, ilTableGUI\$lng, $si, ilAuthUtils\_getActiveAuthModes(), ilAuthUtils\_getAuthModeName(), ilLocalUser\_getFolderIds(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilTable2GUI\addFilterItem(), addFilterItemByUdfType(), filter(), ilAuthUtils\getAuthModeTranslation(), getMode(), getUserFolderId(), IL_CAL_DAY, IL_CAL_UNIX, and USER_FOLDER_ID.

Referenced by __construct().

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

◆ isUdfColumn()

ilUserTableGUI::isUdfColumn (   $a_key)

Field key.

Parameters
string$a_keyfield key
Returns
bool

Definition at line 156 of file class.ilUserTableGUI.php.

157 {
158 if (substr($a_key, 0, 4) == "udf_") {
159 return true;
160 }
161 return false;
162 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ readUserDefinedFieldsDefinitions()

ilUserTableGUI::readUserDefinedFieldsDefinitions ( )

Read user defined fields definitions.

Definition at line 123 of file class.ilUserTableGUI.php.

124 {
125 include_once './Services/User/classes/class.ilUserDefinedFields.php';
126 $user_defined_fields = ilUserDefinedFields::_getInstance();
127 foreach ($user_defined_fields->getDefinitions() as $field => $definition) {
128 $this->udf_fields["udf_" . $field] = array(
129 "txt" => $definition["field_name"],
130 "default" => false,
131 "options" => $definition["field_values"],
132 "type" => $definition["field_type"],
133 "sortable" => in_array($definition["field_type"], array(UDF_TYPE_TEXT, UDF_TYPE_SELECT))
134 );
135 }
136 }
static _getInstance()
Get instance.

References ilUserDefinedFields\_getInstance(), UDF_TYPE_SELECT, and UDF_TYPE_TEXT.

Referenced by __construct().

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

◆ setMode()

ilUserTableGUI::setMode (   $a_mode)
protected

Definition at line 105 of file class.ilUserTableGUI.php.

106 {
107 $this->mode = $a_mode;
108 }

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $filter

ilUserTableGUI::$filter = array()
protected

Definition at line 29 of file class.ilUserTableGUI.php.

Referenced by addFilterItemValue().

◆ $mode

ilUserTableGUI::$mode = null
private

Definition at line 20 of file class.ilUserTableGUI.php.

Referenced by getMode().

◆ $udf_fields

ilUserTableGUI::$udf_fields = array()
protected

Definition at line 26 of file class.ilUserTableGUI.php.

◆ $user_folder_id

ilUserTableGUI::$user_folder_id = 0
private

Definition at line 21 of file class.ilUserTableGUI.php.

Referenced by getUserFolderId().

◆ MODE_LOCAL_USER

◆ MODE_USER_FOLDER

const ilUserTableGUI::MODE_USER_FOLDER = 1

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