ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilUserRoleStartingPointTableGUI Class Reference

TableGUI class for LTI consumer listing. More...

+ Inheritance diagram for ilUserRoleStartingPointTableGUI:
+ Collaboration diagram for ilUserRoleStartingPointTableGUI:

Public Member Functions

 __construct (object $parent_obj, private ilUserStartingPointRepository $starting_point_repository, private ilRbacReview $rbac_review, private UIFactory $ui_factory, private Renderer $ui_renderer,)
 
 getItems ()
 Get data. More...
 
- Public Member Functions inherited from ilTable2GUI
 __construct (?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 determineLimit ()
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 determineSelectedColumns ()
 
 isColumnSelected (string $col)
 
 getSelectedColumns ()
 
 resetOffset (bool $a_in_determination=false)
 
 initFilter ()
 
 getParentObject ()
 
 getParentCmd ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setNoEntriesText (string $a_text)
 
 getNoEntriesText ()
 
 setIsDataTable (bool $a_val)
 
 getIsDataTable ()
 
 setEnableTitle (bool $a_enabletitle)
 
 getEnableTitle ()
 
 setEnableHeader (bool $a_enableheader)
 
 getEnableHeader ()
 
 setEnableNumInfo (bool $a_val)
 
 getEnableNumInfo ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setOrderField (string $a_order_field)
 
 getOrderField ()
 
 setData (array $a_data)
 
 getData ()
 
 dataExists ()
 
 setPrefix (string $a_prefix)
 
 getPrefix ()
 
 addFilterItem (ilTableFilterItem $a_input_item, bool $a_optional=false)
 
 addFilterItemByMetaType (string $id, int $type=self::FILTER_TEXT, bool $a_optional=false, string $caption="")
 Add filter by standard type. More...
 
 getFilterItems (bool $a_optionals=false)
 
 getFilterItemByPostVar (string $a_post_var)
 
 setFilterCols (int $a_val)
 
 getFilterCols ()
 
 setDisableFilterHiding (bool $a_val=true)
 
 getDisableFilterHiding ()
 
 isFilterSelected (string $a_col)
 Is given filter selected? More...
 
 getSelectedFilters ()
 
 determineSelectedFilters ()
 
 setCustomPreviousNext (string $a_prev_link, string $a_next_link)
 
 setFormAction (string $a_form_action, bool $a_multipart=false)
 
 getFormAction ()
 
 setFormName (string $a_name="")
 
 getFormName ()
 
 setId (string $a_val)
 
 getId ()
 
 setDisplayAsBlock (bool $a_val)
 
 getDisplayAsBlock ()
 
 setSelectAllCheckbox (string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
 setExternalSorting (bool $a_val)
 
 getExternalSorting ()
 
 setFilterCommand (string $a_val, string $a_caption="")
 
 getFilterCommand ()
 
 setResetCommand (string $a_val, string $a_caption="")
 
 getResetCommand ()
 
 setExternalSegmentation (bool $a_val)
 
 getExternalSegmentation ()
 
 setRowTemplate (string $a_template, string $a_template_dir="")
 Set row template. More...
 
 setDefaultOrderField (string $a_defaultorderfield)
 
 getDefaultOrderField ()
 
 setDefaultOrderDirection (string $a_defaultorderdirection)
 
 getDefaultOrderDirection ()
 
 setDefaultFilterVisiblity (bool $a_status)
 
 getDefaultFilterVisibility ()
 
 clearCommandButtons ()
 
 addCommandButton (string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
 addCommandButtonInstance (ilButtonBase $a_button)
 
 addMultiItemSelectionButton (string $a_sel_var, array $a_options, string $a_cmd, string $a_text, string $a_default_selection='')
 
 setCloseCommand (string $a_link)
 
 addMultiCommand (string $a_cmd, string $a_text)
 
 addHiddenInput (string $a_name, string $a_value)
 
 addHeaderCommand (string $a_href, string $a_text, string $a_target="", string $a_img="")
 
 setTopCommands (bool $a_val)
 
 getTopCommands ()
 
 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)
 
 getNavParameter ()
 
 setOrderLink (string $key, string $order_dir)
 
 fillHeader ()
 
 determineOffsetAndOrder (bool $a_omit_offset=false)
 
 storeNavParameter ()
 
 getHTML ()
 Get HTML. More...
 
 numericOrdering (string $a_field)
 Should this field be sorted numeric? More...
 
 render ()
 
 writeFilterToSession ()
 
 resetFilter ()
 
 fillFooter ()
 
 getLinkbar (string $a_num)
 
 fillHiddenRow ()
 
 fillActionRow ()
 
 setHeaderHTML (string $html)
 
 storeProperty (string $type, string $value)
 
 loadProperty (string $type)
 
 getCurrentState ()
 get current settings for order, limit, columns and filter More...
 
 setContext (string $id)
 
 getContext ()
 
 setShowRowsSelector (bool $a_value)
 Toggle rows-per-page selector. More...
 
 getShowRowsSelector ()
 
 getLimit ()
 
 getOffset ()
 
 setExportFormats (array $formats)
 Set available export formats. More...
 
 setPrintMode (bool $a_value=false)
 
 getPrintMode ()
 
 getExportMode ()
 
 exportData (int $format, bool $send=false)
 Export and optionally send current table data. More...
 
 setEnableAllCommand (bool $a_value)
 
 setRowSelectorLabel (string $row_selector_label)
 
 getRowSelectorLabel ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 
- Public Member Functions inherited from ilTableGUI
 __construct (array $a_data=[], bool $a_global_tpl=true)
 
 setTemplate (ilTemplate $a_tpl)
 
 getTemplateObject ()
 
 setData (array $a_data)
 Set table data. More...
 
 getData ()
 
 setTitle (string $a_title, string $a_icon="", string $a_icon_alt="")
 
 setHelp (string $a_help_page, string $a_help_icon, string $a_help_icon_alt="")
 
 setHeaderNames (array $a_header_names)
 
 getColumnCount ()
 
 setHeaderVars (array $a_header_vars, array $a_header_params=[])
 
 setColumnWidth (array $a_column_width)
 set table column widths More...
 
 setOneColumnWidth (string $a_column_width, int $a_column_number)
 
 setMaxCount (int $a_max_count)
 set max. More...
 
 setLimit (int $a_limit=0, int $a_default_limit=0)
 set max. More...
 
 getLimit ()
 
 setPrefix (string $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) More...
 
 setOffset (int $a_offset)
 set dataset offset More...
 
 getOffset ()
 
 setOrderColumn (string $a_order_column="", string $a_default_column="")
 
 getOrderColumn ()
 
 setOrderDirection (string $a_order_direction)
 
 getOrderDirection ()
 
 setFooter (string $a_style, string $a_previous="", string $a_next="")
 
 enable (string $a_module_name)
 
 disable (string $a_module_name)
 
 sortData ()
 
 render ()
 
 renderHeader ()
 
 setOrderLink (string $key, string $order_dir)
 
 setStyle (string $a_element, string $a_style)
 
 getStyle (string $a_element)
 
 setBase (string $a_base)
 
 getBase ()
 
 getFormName ()
 get the name of the parent form More...
 
 setFormName (string $a_name="cmd")
 
 getSelectAllCheckbox ()
 get the name of the checkbox that should be toggled with a select all button More...
 
 setSelectAllCheckbox (string $a_select_all_checkbox)
 
 clearActionButtons ()
 
 addActionButton (string $btn_name, string $btn_value)
 

Protected Member Functions

 fillRow (array $row_data)
 
- Protected Member Functions inherited from ilTable2GUI
 getRequestedValues ()
 
 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, ilTableFilterItem $a_element)
 Check if filter element is based on adv md. More...
 
 fillRow (array $a_set)
 Standard Version of Fill Row. More...
 
 getFilterValue (ilTableFilterItem $a_item)
 Get current filter value. More...
 
 setFilterValue (ilTableFilterItem $a_item, $a_value)
 
 fillMetaExcel (ilExcel $a_excel, int &$a_row)
 Add meta information to excel export. More...
 
 fillHeaderExcel (ilExcel $a_excel, int &$a_row)
 Excel Version of Fill Header. More...
 
 fillRowExcel (ilExcel $a_excel, int &$a_row, array $a_set)
 Excel Version of Fill Row. More...
 
 fillMetaCSV (ilCSVWriter $a_csv)
 Add meta information to csv export. More...
 
 fillHeaderCSV (ilCSVWriter $a_csv)
 CSV Version of Fill Header. More...
 
 fillRowCSV (ilCSVWriter $a_csv, array $a_set)
 CSV Version of Fill Row. More...
 

Private Member Functions

 getActions (int $id, ?int $role_id)
 
 getEditLink (int $id, ?int $role_id)
 
 isSortingHidden (int $id)
 
 getTitleForCriterium (int $id, ?int $role_id, string $criterium)
 

Private Attributes

const TABLE_POSITION_USER_CHOOSES = -1
 
const TABLE_POSITION_DEFAULT = 9999
 

Additional Inherited Members

- Static Public Member Functions inherited from ilTable2GUI
static getAllCommandLimit ()
 
- Static Public Member Functions inherited from ilTableGUI
static linkbar (string $AScript, int $AHits, int $ALimit, int $AOffset, array $AParams=array(), array $ALayout=array(), string $prefix='')
 
- 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
string $title = ""
 
string $icon = ""
 
string $icon_alt = ""
 
string $help_page = ""
 
string $help_icon = ""
 
string $help_icon_alt = ""
 
array $header_names = []
 
array $header_vars = []
 
array $linkbar_vars = []
 
array $data = []
 
int $column_count = 0
 
array $column_width = []
 
int $max_count = 0
 
int $limit = 0
 
bool $max_limit = false
 
int $offset = 0
 
string $order_column = ""
 
string $order_direction = ""
 
string $footer_style = ""
 
string $footer_previous = ""
 
string $footer_next = ""
 
bool $lang_support = true
 
bool $global_tpl = false
 
string $form_name = ""
 
string $select_all_checkbox = ""
 
array $action_buttons = []
 
string $prefix = ""
 
string $base = ""
 
array $enabled
 
array $styles
 
- Protected Attributes inherited from ilTable2GUI
string $requested_nav_par2 = ""
 
string $requested_nav_par = ""
 
string $requested_nav_par1 = ""
 
ILIAS Table TableGUIRequest $table_request = null
 
array $selected_columns = []
 
ilCtrl $ctrl
 
object $parent_obj = null
 
string $parent_cmd = ""
 
string $close_command = ""
 
string $top_anchor = "il_table_top"
 
array $filters = array()
 
array $optional_filters = array()
 
string $filter_cmd = 'applyFilter'
 
string $reset_cmd = 'resetFilter'
 
int $filter_cols = 5
 
bool $ext_sort = false
 
bool $ext_seg = false
 
string $context = ""
 
array $mi_sel_buttons = []
 
bool $disable_filter_hiding = false
 
bool $top_commands = true
 
array $selectable_columns = array()
 
array $selected_column = array()
 
bool $show_rows_selector = true
 
bool $rows_selector_off = false
 
bool $nav_determined = false
 
bool $limit_determined = false
 
bool $filters_determined = false
 
bool $columns_determined = false
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
array $export_formats = []
 
int $export_mode = 0
 
bool $print_mode = false
 
bool $enable_command_for_all = false
 
bool $restore_filter = false
 
array $restore_filter_values = []
 
bool $default_filter_visibility = false
 
array $sortable_fields = array()
 
bool $prevent_double_submission = true
 
string $row_selector_label = ""
 
bool $select_all_on_top = false
 
array $sel_buttons = []
 
string $nav_value = ''
 
string $noentriestext = ''
 
string $css_row = ''
 
bool $display_as_block = false
 
string $description = ''
 
string $id = ""
 
bool $custom_prev_next = false
 
string $reset_cmd_txt = ""
 
string $defaultorderfield = ""
 
string $defaultorderdirection = ""
 
array $column = []
 
bool $datatable = false
 
bool $num_info = false
 
bool $form_multipart = false
 
array $row_data = []
 
string $order_field = ""
 
array $selected_filter = []
 
string $form_action = ""
 
string $formname = ""
 
string $sort_order = ""
 
array $buttons = []
 
array $multi = []
 
array $hidden_inputs = []
 
array $header_commands = []
 
string $row_template = ""
 
string $row_template_dir = ""
 
string $filter_cmd_txt = ""
 
string $custom_prev = ""
 
string $custom_next = ""
 
array $raw_post_data = null
 
ilGlobalTemplateInterface $main_tpl
 
- Protected Attributes inherited from ilTableGUI
string $sort_order
 
string $link_params
 
array $header_params
 
 $tpl
 
ilLanguage $lng
 

Detailed Description

TableGUI class for LTI consumer listing.

Author
Jesús López lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 28 of file class.ilUserRoleStartingPointTableGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilUserRoleStartingPointTableGUI::__construct ( object  $parent_obj,
private ilUserStartingPointRepository  $starting_point_repository,
private ilRbacReview  $rbac_review,
private UIFactory  $ui_factory,
private Renderer  $ui_renderer 
)

Definition at line 33 of file class.ilUserRoleStartingPointTableGUI.php.

References ILIAS\GlobalScreen\Provider\__construct(), ilTable2GUI\addColumn(), ilTable2GUI\addCommandButton(), ILIAS\Repository\ctrl(), getItems(), ILIAS\Repository\lng(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setFormAction(), ilTable2GUI\setId(), ilTable2GUI\setLimit(), ilTable2GUI\setRowTemplate(), and ilTable2GUI\setTitle().

39  {
40  $this->setId('usrrolesp');
41 
43 
44  $this->getItems();
45 
46  $this->setLimit(9999);
47  $this->setTitle($this->lng->txt('user_role_starting_point'));
48 
49  $this->addColumn($this->lng->txt('user_order'));
50  $this->addColumn($this->lng->txt('criteria'));
51  $this->addColumn($this->lng->txt('starting_page'));
52  $this->addColumn($this->lng->txt('actions'));
53  $this->setFormAction($this->ctrl->getFormAction($parent_obj));
54  $this->setRowTemplate('tpl.user_role_starting_point_row.html', 'components/ILIAS/User');
55  $this->addCommandButton('saveOrder', $this->lng->txt('save_order'));
56 
57  $this->setExternalSorting(true);
58  }
setFormAction(string $a_form_action, bool $a_multipart=false)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setId(string $a_val)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
setLimit(int $a_limit=0, int $a_default_limit=0)
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)
+ Here is the call graph for this function:

Member Function Documentation

◆ fillRow()

ilUserRoleStartingPointTableGUI::fillRow ( array  $row_data)
protected
Parameters
array<string|int>$row_data

Definition at line 145 of file class.ilUserRoleStartingPointTableGUI.php.

References ilTable2GUI\$id, ILIAS\Repository\ctrl(), getActions(), ilTable2GUI\getParentObject(), getTitleForCriterium(), isSortingHidden(), ILIAS\Repository\lng(), and null.

145  : void
146  {
147  $id = $row_data['id'];
148  $role_id = $row_data['role_id'] ?? null;
149  $this->ctrl->setParameter($this->getParentObject(), 'spid', $id);
150 
151  if ($this->isSortingHidden($id)) {
152  $this->tpl->setVariable('HIDDEN', 'hidden');
153  } else {
154  $this->tpl->setVariable('VAL_ID', 'position[' . (string) $id . ']');
155  $this->tpl->setVariable('VAL_POS', $row_data['starting_position']);
156  }
157 
158  $this->tpl->setVariable(
159  'TXT_TITLE',
160  $this->getTitleForCriterium(
161  $id,
162  $role_id,
163  $row_data['criteria']
164  )
165  );
166 
167  $actions = $this->getActions($id, $role_id);
168 
169  $this->tpl->setVariable('TXT_PAGE', $row_data['starting_page']);
170 
171  $list = $this->ui_factory->dropdown()->standard($actions)->withLabel(
172  $this->lng->txt('actions')
173  );
174 
175  $this->tpl->setVariable('ACTION', $this->ui_renderer->render($list));
176  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getTitleForCriterium(int $id, ?int $role_id, string $criterium)
+ Here is the call graph for this function:

◆ getActions()

ilUserRoleStartingPointTableGUI::getActions ( int  $id,
?int  $role_id 
)
private
Returns
array<strings>

Definition at line 181 of file class.ilUserRoleStartingPointTableGUI.php.

References ILIAS\Repository\ctrl(), getEditLink(), ilTable2GUI\getParentObject(), and ILIAS\Repository\lng().

Referenced by fillRow().

181  : array
182  {
183  $actions = [];
184 
185  $edit_url = $this->getEditLink($id, $role_id);
186 
187  $actions[] = $this->ui_factory->link()->standard(
188  $this->lng->txt('edit'),
189  $edit_url
190  );
191 
192  if ($id !== $this->starting_point_repository->getDefaultStartingPointID()
193  && $id !== $this->starting_point_repository->getUserStartingPointID()) {
194  $delete_url = $this->ctrl->getLinkTarget(
195  $this->getParentObject(),
196  'deleteStartingPoint'
197  );
198  $actions[] = $this->ui_factory->link()->standard(
199  $this->lng->txt('delete'),
200  $delete_url
201  );
202  }
203 
204  return $actions;
205  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditLink()

ilUserRoleStartingPointTableGUI::getEditLink ( int  $id,
?int  $role_id 
)
private

Definition at line 207 of file class.ilUserRoleStartingPointTableGUI.php.

References ILIAS\Repository\ctrl(), and ilTable2GUI\getParentObject().

Referenced by getActions().

207  : string
208  {
209  $cmd = 'initRoleStartingPointForm';
210  if ($id === $this->starting_point_repository->getUserStartingPointID()) {
211  $cmd = 'initUserStartingPointForm';
212  }
213 
214  $this->ctrl->setParameter($this->getParentObject(), 'rolid', $role_id);
215  return $this->ctrl->getLinkTargetByClass(
216  get_class($this->getParentObject()),
217  $cmd
218  );
219  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getItems()

ilUserRoleStartingPointTableGUI::getItems ( )

Get data.

Definition at line 63 of file class.ilUserRoleStartingPointTableGUI.php.

References ilTableGUI\$title, ilObject\_lookupObjId(), ilObjectFactory\getInstanceByObjId(), ILIAS\Repository\lng(), null, ilTable2GUI\setData(), ilArrayUtil\sortArray(), and ilUserStartingPointRepository\START_REPOSITORY_OBJ.

Referenced by __construct().

63  : void
64  {
65  $dc = new ilObjectDataCache();
66 
67  $valid_points = $this->starting_point_repository->getPossibleStartingPoints();
68 
69  $status = ($this->starting_point_repository->isPersonalStartingPointEnabled()
70  ? $this->lng->txt('yes') : $this->lng->txt('no'));
71 
72  $starting_points = [];
73  $starting_points[] = [
74  'id' => $this->starting_point_repository->getUserStartingPointID(),
75  'criteria' => $this->lng->txt('user_chooses_starting_page'),
76  'starting_page' => $status,
77  'starting_position' => self::TABLE_POSITION_USER_CHOOSES
78  ];
79 
80  $available_starting_points = $this->starting_point_repository->getStartingPoints();
81 
82  foreach ($available_starting_points as $available_starting_point) {
83  $starting_point_type = $available_starting_point->getStartingPointType();
84  $position = $available_starting_point->getPosition();
85  $sp_text = $this->lng->txt($valid_points[$starting_point_type]) ?? '';
86 
87  if ($starting_point_type === ilUserStartingPointRepository::START_REPOSITORY_OBJ
88  && $available_starting_point->getStartingObject() !== null) {
89  $starting_object_ref_id = $available_starting_point->getStartingObject();
90  $object_id = ilObject::_lookupObjId($starting_object_ref_id);
91  $type = $dc->lookupType($object_id);
92  $title = $dc->lookupTitle($object_id);
93  $sp_text = $this->lng->txt('obj_' . $type) . ' '
94  . '<i>"' . $title . '" (' . $starting_object_ref_id . ')</i>';
95  }
96 
97  if ($available_starting_point->isRoleBasedStartingPoint()) {
98  $options = unserialize($available_starting_point->getRuleOptions(), ['allowed_classes' => false]);
99 
100  $role_obj = ilObjectFactory::getInstanceByObjId((int) $options['role_id'], false);
101  if (!($role_obj instanceof \ilObjRole)) {
102  continue;
103  }
104 
105  $starting_points[] = [
106  'id' => $available_starting_point->getId(),
107  'criteria' => $role_obj->getTitle(),
108  'starting_page' => $sp_text,
109  'starting_position' => $position,
110  'role_id' => $role_obj->getId()
111  ];
112  }
113  }
114 
115  $default_sp = $this->starting_point_repository->getSystemDefaultStartingPointType();
116  $starting_point = $this->lng->txt($valid_points[$default_sp]);
118  $starting_object_ref_id = $this->starting_point_repository->getSystemDefaultStartingObject();
119 
120  $object_id = ilObject::_lookupObjId($starting_object_ref_id);
121  $type = $dc->lookupType($object_id);
122  $title = $dc->lookupTitle($object_id);
123  $starting_point = $this->lng->txt('obj_' . $type) . ' '
124  . '<i>"' . $title . '" (' . $starting_object_ref_id . ')</i>';
125  }
126 
127  $starting_points[] = [
128  'id' => $this->starting_point_repository->getDefaultStartingPointID(),
129  'criteria' => $this->lng->txt('default'),
130  'starting_page' => $starting_point,
131  'starting_position' => self::TABLE_POSITION_DEFAULT
132  ];
133 
134  $sorted_starting_points = $this->starting_point_repository->reArrangePositions(
135  ilArrayUtil::sortArray($starting_points, 'starting_position', 'asc', true)
136  );
137 
138  $this->setData($sorted_starting_points);
139  }
Class ilObjRole.
setData(array $a_data)
static _lookupObjId(int $ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTitleForCriterium()

ilUserRoleStartingPointTableGUI::getTitleForCriterium ( int  $id,
?int  $role_id,
string  $criterium 
)
private

Definition at line 230 of file class.ilUserRoleStartingPointTableGUI.php.

References $ref_id, ilObjRole\_getTranslation(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ILIAS\Repository\lng(), null, and ROLE_FOLDER_ID.

Referenced by fillRow().

234  : string {
235  if ($id === $this->starting_point_repository->getDefaultStartingPointID()
236  || $id === $this->starting_point_repository->getUserStartingPointID()) {
237  return $criterium;
238  }
239 
240  $parent_title = '';
241  if ($role_id !== null && ilObject::_lookupType($role_id) === 'role') {
242  $ref_id = $this->rbac_review->getObjectReferenceOfRole($role_id);
243  if ($ref_id !== ROLE_FOLDER_ID) {
244  $parent_title = ' (' . ilObject::_lookupTitle(ilObject::_lookupObjId($ref_id)) . ')';
245  }
246  }
247  return $this->lng->txt('has_role') . ': '
248  . ilObjRole::_getTranslation($criterium)
249  . $parent_title;
250  }
static _lookupObjId(int $ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
$ref_id
Definition: ltiauth.php:65
static _lookupTitle(int $obj_id)
static _getTranslation(string $a_role_title)
const ROLE_FOLDER_ID
Definition: constants.php:34
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSortingHidden()

ilUserRoleStartingPointTableGUI::isSortingHidden ( int  $id)
private

Definition at line 221 of file class.ilUserRoleStartingPointTableGUI.php.

Referenced by fillRow().

221  : bool
222  {
223  if ($id === $this->starting_point_repository->getDefaultStartingPointID()
224  || $id === $this->starting_point_repository->getUserStartingPointID()) {
225  return true;
226  }
227  return false;
228  }
+ Here is the caller graph for this function:

Field Documentation

◆ TABLE_POSITION_DEFAULT

const ilUserRoleStartingPointTableGUI::TABLE_POSITION_DEFAULT = 9999
private

Definition at line 31 of file class.ilUserRoleStartingPointTableGUI.php.

◆ TABLE_POSITION_USER_CHOOSES

const ilUserRoleStartingPointTableGUI::TABLE_POSITION_USER_CHOOSES = -1
private

Definition at line 30 of file class.ilUserRoleStartingPointTableGUI.php.


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