ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilWebDAVMountInstructionsDocumentTableGUI Class Reference
+ Inheritance diagram for ilWebDAVMountInstructionsDocumentTableGUI:
+ Collaboration diagram for ilWebDAVMountInstructionsDocumentTableGUI:

Public Member Functions

 __construct (ilWebDAVMountInstructionsUploadGUI $parent_obj, ilWebDAVUriBuilder $webdav_uri_builder, string $command, Factory $ui_factory, Renderer $ui_renderer, RequestInterface $request, bool $is_editable=false)
 
 setProvider (ilWebDAVMountInstructionsTableDataProvider $provider)
 
 getProvider ()
 
 getSelectableColumns ()
 
 populate ()
 
 getHTML ()
 
- 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 ()
 
 setShowTemplates (bool $a_value)
 
 getShowTemplates ()
 
 restoreTemplate (string $a_name)
 Restore state from template. More...
 
 saveTemplate (string $a_name)
 Save current state as template. More...
 
 deleteTemplate (string $a_name)
 
 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

 isColumnVisible (int $index)
 
 fillRow (array $row)
 
 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

ilWebDAVUriBuilder $webdav_uri_builder
 
Factory $ui_factory
 
Renderer $ui_renderer
 
RequestInterface $request
 
bool $is_editable = false
 
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_tmpl_delete
 
string $requested_tmpl_create
 
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_templates = false
 
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,
ilWebDAVUriBuilder  $webdav_uri_builder,
string  $command,
Factory  $ui_factory,
Renderer  $ui_renderer,
RequestInterface  $request,
bool  $is_editable = false 
)

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

References ilTable2GUI\$column, $index, $is_editable, $request, $ui_factory, $ui_renderer, $webdav_uri_builder, 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().

51  {
52  $this->webdav_uri_builder = $webdav_uri_builder;
53  $this->ui_factory = $ui_factory;
54  $this->ui_renderer = $ui_renderer;
55  $this->is_editable = $is_editable;
56  $this->request = $request;
57 
58  $this->setId('mount_instructions_documents');
59  $this->setFormName('mount_instructions_documents');
60 
61  parent::__construct($parent_obj, $command);
62 
63  $columns = $this->getColumnDefinition();
64  $this->optional_columns = $this->getSelectableColumns();
65  $this->visible_optional_columns = $this->getSelectedColumns();
66 
67  foreach ($columns as $index => $column) {
68  if ($this->isColumnVisible($index)) {
69  $this->addColumn(
70  $column['txt'],
71  isset($column['sortable']) && $column['sortable'] ? $column['field'] : '',
72  isset($column['width']) ? $column['width'] : '',
73  isset($column['is_checkbox']) ? (bool) $column['is_checkbox'] : false
74  );
75  }
76  }
77 
78  $this->setTitle($this->lng->txt('webdav_tbl_docs_title'));
79  $this->setFormAction($this->ctrl->getFormAction($this->getParentObject(), $command));
80 
81  $this->setDefaultOrderDirection('ASC');
82  $this->setDefaultOrderField('sorting');
83  $this->setExternalSorting(true);
84  $this->setExternalSegmentation(true);
85  $this->setLimit(PHP_INT_MAX);
86 
87  $this->setRowTemplate('tpl.webdav_documents_row.html', 'Services/WebDAV');
88 
89  if ($this->is_editable) {
90  $this->addCommandButton('saveDocumentSorting', $this->lng->txt('sorting_save'));
91  }
92 
94  }
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="")
setFormName(string $a_name="")
setId(string $a_val)
$index
Definition: metadata.php:145
setExternalSorting(bool $a_val)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
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)
setExternalSegmentation(bool $a_val)
+ Here is the call graph for this function:

Member Function Documentation

◆ fillRow()

ilWebDAVMountInstructionsDocumentTableGUI::fillRow ( array  $row)
finalprotected

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

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

138  : void
139  {
140  foreach ($this->getColumnDefinition() as $index => $column) {
141  if (!$this->isColumnVisible($index)) {
142  continue;
143  }
144 
145  $this->tpl->setCurrentBlock('column');
146  $value = $this->formatCellValue($column['field'], $row);
147  if ($value === '') {
148  $this->tpl->touchBlock('column');
149  } else {
150  $this->tpl->setVariable('COLUMN_VALUE', $value);
151  }
152 
153  $this->tpl->parseCurrentBlock();
154  }
155  }
$index
Definition: metadata.php:145
+ Here is the call graph for this function:

◆ formatActions()

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

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

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

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

◆ formatCellValue()

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

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

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

Referenced by fillRow().

272  : string
273  {
274  $function = 'format' . ucfirst($column);
275  if (method_exists($this, $function)) {
276  return $this->{$function}($column, $row);
277  }
278  if (in_array($column, ['creation_ts', 'modification_ts'])) {
280  }
281 
282  return trim($row[$column]);
283  }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
+ 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 341 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

341  : string
342  {
343  $value = strval(($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.

◆ formatTitle()

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

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

References ilTable2GUI\$id, and $url.

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

◆ getColumnDefinition()

ilWebDAVMountInstructionsDocumentTableGUI::getColumnDefinition ( )
protected

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

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

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

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

◆ getHTML()

ilWebDAVMountInstructionsDocumentTableGUI::getHTML ( )

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

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

◆ getProvider()

ilWebDAVMountInstructionsDocumentTableGUI::getProvider ( )

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

References $provider.

Referenced by populate().

102  {
103  return $this->provider;
104  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ilWebDAVMountInstructionsDocumentTableGUI::getSelectableColumns ( )

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

References ilTable2GUI\$column, and getColumnDefinition().

Referenced by __construct().

106  : array
107  {
108  $optional_columns = array_filter($this->getColumnDefinition(), fn ($column) => isset($column['optional']) && $column['optional']);
109 
110  $columns = [];
111  foreach ($optional_columns as $column) {
112  $columns[$column['field']] = $column;
113  }
114 
115  return $columns;
116  }
+ 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 118 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

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

Referenced by __construct(), and fillRow().

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  }
$index
Definition: metadata.php:145
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populate()

ilWebDAVMountInstructionsDocumentTableGUI::populate ( )

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

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().

219  : void
220  {
221  if ($this->getExternalSegmentation() && $this->getExternalSorting()) {
222  $this->determineOffsetAndOrder();
223  } elseif (!$this->getExternalSegmentation() && $this->getExternalSorting()) {
224  $this->determineOffsetAndOrder(true);
225  }
226 
227  $params = [];
228  if ($this->getExternalSegmentation()) {
229  $params['limit'] = $this->getLimit();
230  $params['offset'] = $this->getOffset();
231  }
232  if ($this->getExternalSorting()) {
233  $params['order_field'] = $this->getOrderField();
234  $params['order_direction'] = $this->getOrderDirection();
235  }
236 
237  $this->determineSelectedFilters();
238  $data = $this->getProvider()->getList();
239 
240  if (!count($data['items']) && $this->getOffset() > 0 && $this->getExternalSegmentation()) {
241  $this->resetOffset();
242  if ($this->getExternalSegmentation()) {
243  $params['limit'] = $this->getLimit();
244  $params['offset'] = $this->getOffset();
245  }
246  $data = $this->getProvider()->getList();
247  }
248 
249  $this->preProcessData($data);
250 
251  $this->setData($data['items']);
252  if ($this->getExternalSegmentation()) {
253  $this->setMaxCount($data['cnt']);
254  }
255  }
setData(array $a_data)
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
resetOffset(bool $a_in_determination=false)
determineOffsetAndOrder(bool $a_omit_offset=false)
setMaxCount(int $a_max_count)
set max.
+ Here is the call graph for this function:

◆ preProcessData()

ilWebDAVMountInstructionsDocumentTableGUI::preProcessData ( array &  $data)
protected

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

References ILIAS\LTI\ToolProvider\$key.

Referenced by populate().

257  : void
258  {
259  foreach ($data['items'] as $key => $document) {
260  $data['items'][$key] = [
261  'id' => $document->getId(),
262  'title' => $document->getTitle(),
263  'creation_ts' => $document->getCreationTs(),
264  'modification_ts' => $document->getModificationTs(),
265  'raw_text' => $document->getUploadedInstructions(),
266  'processed_text' => $document->getProcessedInstructions(),
267  'language' => $document->getLanguage(),
268  ];
269  }
270  }
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the caller graph for this function:

◆ setProvider()

ilWebDAVMountInstructionsDocumentTableGUI::setProvider ( ilWebDAVMountInstructionsTableDataProvider  $provider)

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

References $provider.

96  : void
97  {
98  $this->provider = $provider;
99  }

Field Documentation

◆ $factor

int ilWebDAVMountInstructionsDocumentTableGUI::$factor = 10
protected

◆ $i

int ilWebDAVMountInstructionsDocumentTableGUI::$i = 1
protected

◆ $is_editable

bool ilWebDAVMountInstructionsDocumentTableGUI::$is_editable = false
protected

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

Referenced by __construct().

◆ $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 41 of file class.ilWebDAVMountInstructionsDocumentTableGUI.php.

Referenced by getProvider(), and setProvider().

◆ $request

RequestInterface ilWebDAVMountInstructionsDocumentTableGUI::$request
protected

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

Referenced by __construct().

◆ $ui_components

array ilWebDAVMountInstructionsDocumentTableGUI::$ui_components = []
protected

◆ $ui_factory

Factory ilWebDAVMountInstructionsDocumentTableGUI::$ui_factory
protected

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

Referenced by __construct().

◆ $ui_renderer

Renderer ilWebDAVMountInstructionsDocumentTableGUI::$ui_renderer
protected

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

Referenced by __construct().

◆ $visible_optional_columns

array ilWebDAVMountInstructionsDocumentTableGUI::$visible_optional_columns
protected

◆ $webdav_uri_builder

ilWebDAVUriBuilder ilWebDAVMountInstructionsDocumentTableGUI::$webdav_uri_builder
protected

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

Referenced by __construct().


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