ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilWebDAVMountInstructionsDocumentTableGUI Class Reference
+ Inheritance diagram for ilWebDAVMountInstructionsDocumentTableGUI:
+ Collaboration diagram for ilWebDAVMountInstructionsDocumentTableGUI:

Public Member Functions

 __construct (ilWebDAVMountInstructionsUploadGUI $parent_obj, protected ilWebDAVUriBuilder $webdav_uri_builder, string $command, protected Factory $ui_factory, protected Renderer $ui_renderer, protected RequestInterface $request, protected bool $is_editable=false)
 
 setProvider (ilWebDAVMountInstructionsTableDataProvider $provider)
 
 getProvider ()
 
 getSelectableColumns ()
 Get selectable columns. More...
 
 populate ()
 
 getHTML ()
 Get HTML. 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)
 Set table data. More...
 
 getData ()
 
 dataExists ()
 
 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...
 
 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 ()
 get the name of the parent form More...
 
 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)
 set max. More...
 
- 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

 isColumnVisible (int $index)
 
 fillRow (array $row)
 Standard Version of Fill Row. More...
 
 getColumnDefinition ()
 
 preProcessData (array &$data)
 
 formatCellValue (string $column, array $row)
 
 formatActions (string $column, array $row)
 
 formatTitle (string $column, array $row)
 
 formatSorting (string $column, array $row)
 
- 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...
 

Protected Attributes

int $factor = 10
 
int $i = 1
 
int $num_rendered_criteria = 0
 
array $optional_columns
 
array $visible_optional_columns
 
array $ui_components = []
 
ilWebDAVMountInstructionsTableDataProvider $provider = null
 
- 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
 

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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilWebDAVMountInstructionsDocumentTableGUI::__construct ( ilWebDAVMountInstructionsUploadGUI  $parent_obj,
protected ilWebDAVUriBuilder  $webdav_uri_builder,
string  $command,
protected Factory  $ui_factory,
protected Renderer  $ui_renderer,
protected RequestInterface  $request,
protected bool  $is_editable = false 
)

Definition at line 39 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

47 {
48 $this->setId('mount_instructions_documents');
49 $this->setFormName('mount_instructions_documents');
50
51 parent::__construct($parent_obj, $command);
52
53 $columns = $this->getColumnDefinition();
54 $this->optional_columns = $this->getSelectableColumns();
55 $this->visible_optional_columns = $this->getSelectedColumns();
56
57 foreach ($columns as $index => $column) {
58 if ($this->isColumnVisible($index)) {
59 $this->addColumn(
60 $column['txt'],
61 isset($column['sortable']) && $column['sortable'] ? $column['field'] : '',
62 isset($column['width']) ? $column['width'] : '',
63 isset($column['is_checkbox']) ? (bool) $column['is_checkbox'] : false
64 );
65 }
66 }
67
68 $this->setTitle($this->lng->txt('webdav_tbl_docs_title'));
69 $this->setFormAction($this->ctrl->getFormAction($this->getParentObject(), $command));
70
71 $this->setDefaultOrderDirection('ASC');
72 $this->setDefaultOrderField('sorting');
73 $this->setExternalSorting(true);
74 $this->setExternalSegmentation(true);
75 $this->setLimit(PHP_INT_MAX);
76
77 $this->setRowTemplate('tpl.webdav_documents_row.html', 'components/ILIAS/WebDAV');
78
79 if ($this->is_editable) {
80 $this->addCommandButton('saveDocumentSorting', $this->lng->txt('sorting_save'));
81 }
82
84 }
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setExternalSegmentation(bool $a_val)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setFormName(string $a_name="")
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setDefaultOrderField(string $a_defaultorderfield)
setExternalSorting(bool $a_val)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
setDefaultOrderDirection(string $a_defaultorderdirection)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ilTable2GUI\$column, ILIAS\GlobalScreen\Provider\__construct(), ilTable2GUI\addColumn(), ilTable2GUI\addCommandButton(), ILIAS\Repository\ctrl(), getColumnDefinition(), getSelectableColumns(), ilTable2GUI\getSelectedColumns(), isColumnVisible(), ILIAS\Repository\lng(), ilWebDAVMountInstructionsModalGUI\maybeRenderWebDAVModalInGlobalTpl(), ilTable2GUI\setDefaultOrderDirection(), ilTable2GUI\setDefaultOrderField(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setFormAction(), ilTable2GUI\setFormName(), ilTable2GUI\setId(), ilTable2GUI\setLimit(), ilTable2GUI\setRowTemplate(), and ilTable2GUI\setTitle().

+ Here is the call graph for this function:

Member Function Documentation

◆ fillRow()

ilWebDAVMountInstructionsDocumentTableGUI::fillRow ( array  $a_set)
finalprotected

Standard Version of Fill Row.

Most likely to be overwritten by derived class.

Parameters
array<string,mixed>$a_set data array

Reimplemented from ilTable2GUI.

Definition at line 131 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

131 : void
132 {
133 foreach ($this->getColumnDefinition() as $index => $column) {
134 if (!$this->isColumnVisible($index)) {
135 continue;
136 }
137
138 $this->tpl->setCurrentBlock('column');
139 $value = $this->formatCellValue($column['field'], $row);
140 if ($value === '') {
141 $this->tpl->touchBlock('column');
142 } else {
143 $this->tpl->setVariable('COLUMN_VALUE', $value);
144 }
145
146 $this->tpl->parseCurrentBlock();
147 }
148 }

References ilTable2GUI\$column, formatCellValue(), getColumnDefinition(), and isColumnVisible().

+ Here is the call graph for this function:

◆ formatActions()

ilWebDAVMountInstructionsDocumentTableGUI::formatActions ( string  $column,
array  $row 
)
protected

Definition at line 278 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

278 : string
279 {
280 if (!$this->is_editable) {
281 return '';
282 }
283
284 $this->ctrl->setParameter($this->getParentObject(), 'document_id', $row['id']);
285
286 $edit_btn = $this->ui_factory
287 ->button()
288 ->shy(
289 $this->lng->txt('edit'),
290 $this->ctrl->getLinkTarget($this->getParentObject(), 'showEditDocumentForm')
291 );
292
293 $delete_modal = $this->ui_factory
294 ->modal()
295 ->interruptive(
296 $this->lng->txt('webdav_doc_delete'),
297 $this->lng->txt('webdav_sure_delete_documents_s') . ' ' . $row['title'],
298 $this->ctrl->getFormAction($this->getParentObject(), 'deleteDocument')
299 );
300
301 $delete_btn = $this->ui_factory
302 ->button()
303 ->shy($this->lng->txt('delete'), '#')
304 ->withOnClick($delete_modal->getShowSignal());
305
306 $this->ui_components[] = $delete_modal;
307
308 $this->ctrl->setParameter($this->getParentObject(), 'document_id', null);
309
310 $drop_down = $this->ui_factory
311 ->dropdown()
312 ->standard([$edit_btn, $delete_btn])
313 ->withLabel($this->lng->txt('actions'));
314
315 return $this->ui_renderer->render($drop_down);
316 }

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

+ Here is the call graph for this function:

◆ formatCellValue()

ilWebDAVMountInstructionsDocumentTableGUI::formatCellValue ( string  $column,
array  $row 
)
protected

Definition at line 265 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

265 : string
266 {
267 $function = 'format' . ucfirst($column);
268 if (method_exists($this, $function)) {
269 return $this->{$function}($column, $row);
270 }
271 if (in_array($column, ['creation_ts', 'modification_ts'])) {
273 }
274
275 return trim((string) $row[$column]);
276 }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling

References ilTable2GUI\$column, ilDatePresentation\formatDate(), and IL_CAL_DATETIME.

Referenced by fillRow().

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

◆ formatSorting()

ilWebDAVMountInstructionsDocumentTableGUI::formatSorting ( string  $column,
array  $row 
)
protected

Definition at line 334 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

334 : string
335 {
336 $value = strval(($this->i++) * $this->factor);
337 if (!$this->is_editable) {
338 return $value;
339 }
340
341 $sorting_field = new ilNumberInputGUI('', 'sorting[' . $row['id'] . ']');
342 $sorting_field->setValue($value);
343 $sorting_field->setMaxLength(4);
344 $sorting_field->setSize(2);
345
346 return $sorting_field->render();
347 }
This class represents a number property in a property form.

◆ formatTitle()

ilWebDAVMountInstructionsDocumentTableGUI::formatTitle ( string  $column,
array  $row 
)
protected

Definition at line 318 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

318 : string
319 {
320 if ($row['processed_text'] == null) {
321 $row['processed_text'] = '';
322 }
323
324 $uri_builder = new ilWebDAVUriBuilder($this->request);
325 $url = $uri_builder->getUriToMountInstructionModalByLanguage($row['language']);
326 $title_link = $this->ui_factory
327 ->button()
328 ->shy($row[$column], '#')
329 ->withAdditionalOnLoadCode(fn($id): string => "$('#$id').click(function(){ triggerWebDAVModal('$url');});");
330
331 return $this->ui_renderer->render([$title_link]);
332 }
$url
Definition: shib_logout.php:68

References ilTable2GUI\$column, ilTable2GUI\$id, and $url.

◆ getColumnDefinition()

ilWebDAVMountInstructionsDocumentTableGUI::getColumnDefinition ( )
protected

Definition at line 150 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

150 : array
151 {
152 $i = 0;
153
154 $columns = [];
155
156 $columns[++$i] = [
157 'field' => 'sorting',
158 'txt' => $this->lng->txt('meta_order', 'meta'),
159 'default' => true,
160 'optional' => false,
161 'sortable' => false,
162 'width' => '5%'
163 ];
164
165 $columns[++$i] = [
166 'field' => 'title',
167 'txt' => $this->lng->txt('webdav_tbl_docs_head_title'),
168 'default' => true,
169 'optional' => false,
170 'sortable' => false,
171 'width' => '25%'
172 ];
173
174 $columns[++$i] = [
175 'field' => 'creation_ts',
176 'txt' => $this->lng->txt('created'),
177 'default' => true,
178 'optional' => true,
179 'sortable' => false
180 ];
181
182 $columns[++$i] = [
183 'field' => 'modification_ts',
184 'txt' => $this->lng->txt('last_change'),
185 'default' => true,
186 'optional' => true,
187 'sortable' => false
188 ];
189
190 $columns[++$i] = [
191 'field' => 'language',
192 'txt' => $this->lng->txt('language'),
193 'default' => true,
194 'optional' => false,
195 'sortable' => false
196 ];
197
198 if ($this->is_editable) {
199 $columns[++$i] = [
200 'field' => 'actions',
201 'txt' => $this->lng->txt('actions'),
202 'default' => true,
203 'optional' => false,
204 'sortable' => false,
205 'width' => '10%'
206 ];
207 };
208
209 return $columns;
210 }

References $i, and ILIAS\Repository\lng().

Referenced by __construct(), fillRow(), getSelectableColumns(), and isColumnVisible().

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

◆ getHTML()

ilWebDAVMountInstructionsDocumentTableGUI::getHTML ( )

Get HTML.

Reimplemented from ilTable2GUI.

Definition at line 349 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

349 : string
350 {
351 return parent::getHTML() . $this->ui_renderer->render($this->ui_components);
352 }

◆ getProvider()

ilWebDAVMountInstructionsDocumentTableGUI::getProvider ( )

◆ getSelectableColumns()

ilWebDAVMountInstructionsDocumentTableGUI::getSelectableColumns ( )

Get selectable columns.

Returns
array key: column id, val: true/false -> default on/off

Reimplemented from ilTable2GUI.

Definition at line 96 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

96 : array
97 {
98 $optional_columns = array_filter(
99 $this->getColumnDefinition(),
100 fn($column): bool => isset($column['optional']) && $column['optional']
101 );
102
103 $columns = [];
104 foreach ($optional_columns as $column) {
105 $columns[$column['field']] = $column;
106 }
107
108 return $columns;
109 }

References ilTable2GUI\$column, $optional_columns, and getColumnDefinition().

Referenced by __construct().

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

◆ isColumnVisible()

ilWebDAVMountInstructionsDocumentTableGUI::isColumnVisible ( int  $index)
protected

Definition at line 111 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

111 : bool
112 {
113 $column_definition = $this->getColumnDefinition();
114 if (array_key_exists($index, $column_definition)) {
115 $column = $column_definition[$index];
116 if (isset($column['optional']) && !$column['optional']) {
117 return true;
118 }
119
120 if (
121 is_array($this->visible_optional_columns) &&
122 array_key_exists($column['field'], $this->visible_optional_columns)
123 ) {
124 return true;
125 }
126 }
127
128 return false;
129 }

References ilTable2GUI\$column, and getColumnDefinition().

Referenced by __construct(), and fillRow().

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

◆ populate()

ilWebDAVMountInstructionsDocumentTableGUI::populate ( )

Definition at line 212 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

212 : void
213 {
214 if ($this->getExternalSegmentation() && $this->getExternalSorting()) {
216 } elseif (!$this->getExternalSegmentation() && $this->getExternalSorting()) {
217 $this->determineOffsetAndOrder(true);
218 }
219
220 $params = [];
221 if ($this->getExternalSegmentation()) {
222 $params['limit'] = $this->getLimit();
223 $params['offset'] = $this->getOffset();
224 }
225 if ($this->getExternalSorting()) {
226 $params['order_field'] = $this->getOrderField();
227 $params['order_direction'] = $this->getOrderDirection();
228 }
229
231 $data = $this->getProvider()->getList();
232
233 if (!count($data['items']) && $this->getOffset() > 0 && $this->getExternalSegmentation()) {
234 $this->resetOffset();
235 if ($this->getExternalSegmentation()) {
236 $params['limit'] = $this->getLimit();
237 $params['offset'] = $this->getOffset();
238 }
239 $data = $this->getProvider()->getList();
240 }
241
242 $this->preProcessData($data);
243
244 $this->setData($data['items']);
245 if ($this->getExternalSegmentation()) {
246 $this->setMaxCount($data['cnt']);
247 }
248 }
determineOffsetAndOrder(bool $a_omit_offset=false)
resetOffset(bool $a_in_determination=false)
setData(array $a_data)
Set table data.
setMaxCount(int $a_max_count)
set max.
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31

References ilTableGUI\$data, $params, ilTable2GUI\determineOffsetAndOrder(), ilTable2GUI\determineSelectedFilters(), ilTable2GUI\getExternalSegmentation(), ilTable2GUI\getExternalSorting(), ilTable2GUI\getLimit(), ilTable2GUI\getOffset(), ilTableGUI\getOrderDirection(), ilTable2GUI\getOrderField(), getProvider(), preProcessData(), ilTable2GUI\resetOffset(), ilTable2GUI\setData(), and ilTableGUI\setMaxCount().

+ Here is the call graph for this function:

◆ preProcessData()

ilWebDAVMountInstructionsDocumentTableGUI::preProcessData ( array &  $data)
protected

Definition at line 250 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

250 : void
251 {
252 foreach ($data['items'] as $key => $document) {
253 $data['items'][$key] = [
254 'id' => $document->getId(),
255 'title' => $document->getTitle(),
256 'creation_ts' => $document->getCreationTs(),
257 'modification_ts' => $document->getModificationTs(),
258 'raw_text' => $document->getUploadedInstructions(),
259 'processed_text' => $document->getProcessedInstructions(),
260 'language' => $document->getLanguage(),
261 ];
262 }
263 }

References ilTableGUI\$data.

Referenced by populate().

+ Here is the caller graph for this function:

◆ setProvider()

ilWebDAVMountInstructionsDocumentTableGUI::setProvider ( ilWebDAVMountInstructionsTableDataProvider  $provider)

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

86 : void
87 {
88 $this->provider = $provider;
89 }

References $provider.

Field Documentation

◆ $factor

int ilWebDAVMountInstructionsDocumentTableGUI::$factor = 10
protected

◆ $i

int ilWebDAVMountInstructionsDocumentTableGUI::$i = 1
protected

◆ $num_rendered_criteria

int ilWebDAVMountInstructionsDocumentTableGUI::$num_rendered_criteria = 0
protected

◆ $optional_columns

array ilWebDAVMountInstructionsDocumentTableGUI::$optional_columns
protected

◆ $provider

ilWebDAVMountInstructionsTableDataProvider ilWebDAVMountInstructionsDocumentTableGUI::$provider = null
protected

Definition at line 37 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

Referenced by getProvider(), and setProvider().

◆ $ui_components

array ilWebDAVMountInstructionsDocumentTableGUI::$ui_components = []
protected

◆ $visible_optional_columns

array ilWebDAVMountInstructionsDocumentTableGUI::$visible_optional_columns
protected

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