ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
ILIAS\WebDAV\Mount\DocumentTableGUI Class Reference
+ Inheritance diagram for ILIAS\WebDAV\Mount\DocumentTableGUI:
+ Collaboration diagram for ILIAS\WebDAV\Mount\DocumentTableGUI:

Public Member Functions

 __construct (UploadGUI $parent_obj, protected UriBuilder $webdav_uri_builder, string $command, protected Factory $ui_factory, protected Renderer $ui_renderer, protected RequestInterface $request, protected bool $is_editable=false)
 
 setProvider (TableDataProvider $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 = []
 
TableDataProvider $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

Definition at line 32 of file DocumentTableGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\WebDAV\Mount\DocumentTableGUI::__construct ( UploadGUI  $parent_obj,
protected UriBuilder  $webdav_uri_builder,
string  $command,
protected Factory  $ui_factory,
protected Renderer  $ui_renderer,
protected RequestInterface  $request,
protected bool  $is_editable = false 
)

Definition at line 45 of file DocumentTableGUI.php.

53 {
54 $this->setId('mount_instructions_documents');
55 $this->setFormName('mount_instructions_documents');
56
58
59 $columns = $this->getColumnDefinition();
60 $this->optional_columns = $this->getSelectableColumns();
61 $this->visible_optional_columns = $this->getSelectedColumns();
62
63 foreach ($columns as $index => $column) {
64 if ($this->isColumnVisible($index)) {
65 $this->addColumn(
66 $column['txt'],
67 isset($column['sortable']) && $column['sortable'] ? $column['field'] : '',
68 $column['width'] ?? '',
69 isset($column['is_checkbox']) && (bool) $column['is_checkbox']
70 );
71 }
72 }
73
74 $this->setTitle($this->lng->txt('webdav_tbl_docs_title'));
75 $this->setFormAction($this->ctrl->getFormAction($this->getParentObject(), $command));
76
77 $this->setDefaultOrderDirection('ASC');
78 $this->setDefaultOrderField('sorting');
79 $this->setExternalSorting(true);
80 $this->setExternalSegmentation(true);
81 $this->setLimit(PHP_INT_MAX);
82
83 $this->setRowTemplate('tpl.webdav_documents_row.html', 'components/ILIAS/WebDAV');
84
85 if ($this->is_editable) {
86 $this->addCommandButton('saveDocumentSorting', $this->lng->txt('sorting_save'));
87 }
88
90 }
getSelectableColumns()
Get selectable columns.
static maybeRenderWebDAVModalInGlobalTpl()
Definition: ModalGUI.php:64
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(), ILIAS\WebDAV\Mount\DocumentTableGUI\getColumnDefinition(), ILIAS\WebDAV\Mount\DocumentTableGUI\getSelectableColumns(), ilTable2GUI\getSelectedColumns(), ILIAS\WebDAV\Mount\DocumentTableGUI\isColumnVisible(), ILIAS\Repository\lng(), ILIAS\WebDAV\Mount\ModalGUI\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()

ILIAS\WebDAV\Mount\DocumentTableGUI::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 139 of file DocumentTableGUI.php.

139 : void
140 {
141 foreach ($this->getColumnDefinition() as $index => $column) {
142 if (!$this->isColumnVisible($index)) {
143 continue;
144 }
145
146 $this->tpl->setCurrentBlock('column');
147 $value = $this->formatCellValue($column['field'], $row);
148 if ($value === '') {
149 $this->tpl->touchBlock('column');
150 } else {
151 $this->tpl->setVariable('COLUMN_VALUE', $value);
152 }
153
154 $this->tpl->parseCurrentBlock();
155 }
156 }
formatCellValue(string $column, array $row)

References ilTable2GUI\$column, ILIAS\WebDAV\Mount\DocumentTableGUI\formatCellValue(), ILIAS\WebDAV\Mount\DocumentTableGUI\getColumnDefinition(), and ILIAS\WebDAV\Mount\DocumentTableGUI\isColumnVisible().

+ Here is the call graph for this function:

◆ formatActions()

ILIAS\WebDAV\Mount\DocumentTableGUI::formatActions ( string  $column,
array  $row 
)
protected

Definition at line 286 of file DocumentTableGUI.php.

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

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

+ Here is the call graph for this function:

◆ formatCellValue()

ILIAS\WebDAV\Mount\DocumentTableGUI::formatCellValue ( string  $column,
array  $row 
)
protected

Definition at line 273 of file DocumentTableGUI.php.

273 : string
274 {
275 $function = 'format' . ucfirst($column);
276 if (method_exists($this, $function)) {
277 return $this->{$function}($column, $row);
278 }
279 if (in_array($column, ['creation_ts', 'modification_ts'], true)) {
281 }
282
283 return trim((string) $row[$column]);
284 }
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 ILIAS\WebDAV\Mount\DocumentTableGUI\fillRow().

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

◆ formatSorting()

ILIAS\WebDAV\Mount\DocumentTableGUI::formatSorting ( string  $column,
array  $row 
)
protected

Definition at line 341 of file DocumentTableGUI.php.

341 : string
342 {
343 $value = (string) (($this->i++) * $this->factor);
344 if (!$this->is_editable) {
345 return $value;
346 }
347
348 $sorting_field = new ilNumberInputGUI('', 'sorting[' . $row['id'] . ']');
349 $sorting_field->setValue($value);
350 $sorting_field->setMaxLength(4);
351 $sorting_field->setSize(2);
352
353 return $sorting_field->render();
354 }
This class represents a number property in a property form.

References ILIAS\WebDAV\Mount\DocumentTableGUI\$factor.

◆ formatTitle()

ILIAS\WebDAV\Mount\DocumentTableGUI::formatTitle ( string  $column,
array  $row 
)
protected

Definition at line 326 of file DocumentTableGUI.php.

326 : string
327 {
328 if ($row['processed_text'] === null) {
329 $row['processed_text'] = '';
330 }
331
332 $url = $this->webdav_uri_builder->getUriToMountInstructionModalByLanguage($row['language']);
333 $title_link = $this->ui_factory
334 ->button()
335 ->shy($row[$column], '#')
336 ->withAdditionalOnLoadCode(fn($id): string => "$('#$id').click(function(){ triggerWebDAVModal('$url');});");
337
338 return $this->ui_renderer->render([$title_link]);
339 }
$url
Definition: shib_logout.php:70

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

◆ getColumnDefinition()

ILIAS\WebDAV\Mount\DocumentTableGUI::getColumnDefinition ( )
protected

Definition at line 158 of file DocumentTableGUI.php.

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

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

Referenced by ILIAS\WebDAV\Mount\DocumentTableGUI\__construct(), ILIAS\WebDAV\Mount\DocumentTableGUI\fillRow(), ILIAS\WebDAV\Mount\DocumentTableGUI\getSelectableColumns(), and ILIAS\WebDAV\Mount\DocumentTableGUI\isColumnVisible().

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

◆ getHTML()

ILIAS\WebDAV\Mount\DocumentTableGUI::getHTML ( )

Get HTML.

Reimplemented from ilTable2GUI.

Definition at line 357 of file DocumentTableGUI.php.

357 : string
358 {
359 return parent::getHTML() . $this->ui_renderer->render($this->ui_components);
360 }

◆ getProvider()

ILIAS\WebDAV\Mount\DocumentTableGUI::getProvider ( )

Definition at line 97 of file DocumentTableGUI.php.

97 : ?TableDataProvider
98 {
99 return $this->provider;
100 }

References ILIAS\WebDAV\Mount\DocumentTableGUI\$provider.

Referenced by ILIAS\WebDAV\Mount\DocumentTableGUI\populate().

+ Here is the caller graph for this function:

◆ getSelectableColumns()

ILIAS\WebDAV\Mount\DocumentTableGUI::getSelectableColumns ( )

Get selectable columns.

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

Reimplemented from ilTable2GUI.

Definition at line 103 of file DocumentTableGUI.php.

103 : array
104 {
105 $optional_columns = array_filter(
106 $this->getColumnDefinition(),
107 static fn(array $column): bool => isset($column['optional']) && $column['optional']
108 );
109
110 $columns = [];
111 foreach ($optional_columns as $column) {
112 $columns[$column['field']] = $column;
113 }
114
115 return $columns;
116 }

References ilTable2GUI\$column, ILIAS\WebDAV\Mount\DocumentTableGUI\$optional_columns, and ILIAS\WebDAV\Mount\DocumentTableGUI\getColumnDefinition().

Referenced by ILIAS\WebDAV\Mount\DocumentTableGUI\__construct().

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

◆ isColumnVisible()

ILIAS\WebDAV\Mount\DocumentTableGUI::isColumnVisible ( int  $index)
protected

Definition at line 118 of file DocumentTableGUI.php.

118 : bool
119 {
120 $column_definition = $this->getColumnDefinition();
121 if (array_key_exists($index, $column_definition)) {
122 $column = $column_definition[$index];
123 if (isset($column['optional']) && !$column['optional']) {
124 return true;
125 }
126
127 if (
128 is_array($this->visible_optional_columns) &&
129 array_key_exists($column['field'], $this->visible_optional_columns)
130 ) {
131 return true;
132 }
133 }
134
135 return false;
136 }

References ilTable2GUI\$column, and ILIAS\WebDAV\Mount\DocumentTableGUI\getColumnDefinition().

Referenced by ILIAS\WebDAV\Mount\DocumentTableGUI\__construct(), and ILIAS\WebDAV\Mount\DocumentTableGUI\fillRow().

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

◆ populate()

ILIAS\WebDAV\Mount\DocumentTableGUI::populate ( )

Definition at line 220 of file DocumentTableGUI.php.

220 : void
221 {
222 if ($this->getExternalSegmentation() && $this->getExternalSorting()) {
224 } elseif (!$this->getExternalSegmentation() && $this->getExternalSorting()) {
225 $this->determineOffsetAndOrder(true);
226 }
227
228 $params = [];
229 if ($this->getExternalSegmentation()) {
230 $params['limit'] = $this->getLimit();
231 $params['offset'] = $this->getOffset();
232 }
233 if ($this->getExternalSorting()) {
234 $params['order_field'] = $this->getOrderField();
235 $params['order_direction'] = $this->getOrderDirection();
236 }
237
239 $data = $this->getProvider()->getList();
240
241 if (!count($data['items']) && $this->getOffset() > 0 && $this->getExternalSegmentation()) {
242 $this->resetOffset();
243 if ($this->getExternalSegmentation()) {
244 $params['limit'] = $this->getLimit();
245 $params['offset'] = $this->getOffset();
246 }
247 $data = $this->getProvider()->getList();
248 }
249
250 $this->preProcessData($data);
251
252 $this->setData($data['items']);
253 if ($this->getExternalSegmentation()) {
254 $this->setMaxCount($data['cnt']);
255 }
256 }
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(), ILIAS\WebDAV\Mount\DocumentTableGUI\getProvider(), ILIAS\WebDAV\Mount\DocumentTableGUI\preProcessData(), ilTable2GUI\resetOffset(), ilTable2GUI\setData(), and ilTableGUI\setMaxCount().

+ Here is the call graph for this function:

◆ preProcessData()

ILIAS\WebDAV\Mount\DocumentTableGUI::preProcessData ( array &  $data)
protected

Definition at line 258 of file DocumentTableGUI.php.

258 : void
259 {
260 foreach ($data['items'] as $key => $document) {
261 $data['items'][$key] = [
262 'id' => $document->getId(),
263 'title' => $document->getTitle(),
264 'creation_ts' => $document->getCreationTs(),
265 'modification_ts' => $document->getModificationTs(),
266 'raw_text' => $document->getUploadedInstructions(),
267 'processed_text' => $document->getProcessedInstructions(),
268 'language' => $document->getLanguage(),
269 ];
270 }
271 }

References ilTableGUI\$data.

Referenced by ILIAS\WebDAV\Mount\DocumentTableGUI\populate().

+ Here is the caller graph for this function:

◆ setProvider()

ILIAS\WebDAV\Mount\DocumentTableGUI::setProvider ( TableDataProvider  $provider)

Definition at line 92 of file DocumentTableGUI.php.

92 : void
93 {
94 $this->provider = $provider;
95 }

References ILIAS\WebDAV\Mount\DocumentTableGUI\$provider.

Field Documentation

◆ $factor

int ILIAS\WebDAV\Mount\DocumentTableGUI::$factor = 10
protected

◆ $i

int ILIAS\WebDAV\Mount\DocumentTableGUI::$i = 1
protected

◆ $num_rendered_criteria

int ILIAS\WebDAV\Mount\DocumentTableGUI::$num_rendered_criteria = 0
protected

Definition at line 36 of file DocumentTableGUI.php.

◆ $optional_columns

array ILIAS\WebDAV\Mount\DocumentTableGUI::$optional_columns
protected

◆ $provider

TableDataProvider ILIAS\WebDAV\Mount\DocumentTableGUI::$provider = null
protected

◆ $ui_components

array ILIAS\WebDAV\Mount\DocumentTableGUI::$ui_components = []
protected

Definition at line 41 of file DocumentTableGUI.php.

◆ $visible_optional_columns

array ILIAS\WebDAV\Mount\DocumentTableGUI::$visible_optional_columns
protected

Definition at line 38 of file DocumentTableGUI.php.


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