ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\LegalDocuments\Legacy\Table Class Reference
+ Inheritance diagram for ILIAS\LegalDocuments\Legacy\Table:
+ Collaboration diagram for ILIAS\LegalDocuments\Legacy\Table:

Public Member Functions

 __construct (?object $gui, string $command, TableInterface $table)
 
 setMaxCount (int $a_max_count)
 
 setSelectableColumns (string ... $names)
 
 selection ()
 
 getSelectableColumns ()
 
 filter ()
 
 render ()
 
 setupFilter (string $reset_command)
 
- 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)
 
- Public Member Functions inherited from ILIAS\LegalDocuments\TableSelection
 getOrderDirection ()
 
 getOrderField ()
 
 getLimit ()
 
 getOffset ()
 

Protected Member Functions

 isColumnVisible (int $index)
 
 fillRow (array $a_set)
 
 tableCellOfField ($x)
 
 txt (string $key)
 
- 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

 visibleColumns ()
 
 resetParameters (array $parameters)
 
 applyParamters (array $parameters)
 
 asString ($x)
 
 requireKeys (array $required, array $given)
 
 diff (array $a, array $b)
 
 intersect (array $a, array $b)
 
 has ($x, array $array)
 
 filterInputs ()
 
 renderModals ()
 
 removeModals ($x)
 
 flatMap (callable $proc, array $a)
 
 asArray ($x)
 
 isModal ($x)
 

Private Attributes

readonly array $columns
 
array $sel = []
 

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

Definition at line 35 of file Table.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\Legacy\Table::__construct ( ?object  $gui,
string  $command,
TableInterface  $table 
)

Definition at line 42 of file Table.php.

References $DIC, ilTable2GUI\$id, $txt, ILIAS\GlobalScreen\Provider\__construct(), ilTable2GUI\addColumn(), ILIAS\Repository\ctrl(), ilTable2GUI\determineOffsetAndOrder(), iljQueryUtil\initjQuery(), ilYuiUtil\initOverlay(), ilYuiUtil\initPanel(), ilTable2GUI\setData(), ilTable2GUI\setExternalSegmentation(), ilTable2GUI\setExternalSorting(), ilTable2GUI\setFormAction(), ilTable2GUI\setFormName(), ilTable2GUI\setId(), ilTable2GUI\setRowTemplate(), ilTable2GUI\setShowRowsSelector(), and ILIAS\LegalDocuments\Legacy\Table\visibleColumns().

43  {
44  global $DIC;
45  $apply = fn($proc) => fn(array $args) => $proc(...$args);
46  $translate = fn(string $txt, ...$args) => [$txt, ...$args];
47 
48  $id = substr(md5($table->name()), 0, 30);
49  $this->setId($id);
50  $this->columns = array_map($apply($translate), $table->columns());
51  $this->setFormName($id);
52  $config = new SmoothTableConfig($this);
53  $table->config($config);
54  parent::__construct($gui, $command);
55  $config->flush();
56  $this->setFormAction($this->ctrl->getFormAction($this->getParentObject(), $command));
57  $this->setRowTemplate('legacy-table-row.html', 'components/ILIAS/LegalDocuments');
58  array_map($apply($this->addColumn(...)), $this->visibleColumns());
59  $this->setShowRowsSelector(false);
60  $this->setExternalSorting(true);
61  $this->setExternalSegmentation(true);
62  iljQueryUtil::initjQuery($DIC->ui()->mainTemplate());
63  ilYuiUtil::initPanel(false, $DIC->ui()->mainTemplate());
64  ilYuiUtil::initOverlay($DIC->ui()->mainTemplate());
65  $DIC->ui()->mainTemplate()->addJavaScript('assets/js/Form.js');
66  $this->determineOffsetAndOrder();
67  $this->setData($table->rows($this));
68  }
setData(array $a_data)
setFormAction(string $a_form_action, bool $a_multipart=false)
setFormName(string $a_name="")
setId(string $a_val)
setExternalSorting(bool $a_val)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
static initjQuery(?ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
global $DIC
Definition: shib_login.php:22
$txt
Definition: error.php:31
__construct(Container $dic, ilPlugin $plugin)
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)
determineOffsetAndOrder(bool $a_omit_offset=false)
static initPanel(bool $a_resize=false, ?ilGlobalTemplateInterface $a_main_tpl=null)
Init yui panel used in Modules/Test, Services/TermsOfService (Jan 2022)
static initOverlay(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Overlay module used in Modules/Test, Services/TermsOfService, Services/Tracking, Services/UIComponent.
setExternalSegmentation(bool $a_val)
+ Here is the call graph for this function:

Member Function Documentation

◆ applyParamters()

ILIAS\LegalDocuments\Legacy\Table::applyParamters ( array  $parameters)
private
Parameters
array<string,string>$parameters

Definition at line 134 of file Table.php.

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

Referenced by ILIAS\LegalDocuments\Legacy\Table\resetParameters().

134  : void
135  {
136  foreach ($parameters as $key => $value) {
137  $this->ctrl->setParameter($this->getParentObject(), $key, $value);
138  }
139  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ asArray()

ILIAS\LegalDocuments\Legacy\Table::asArray (   $x)
private

Definition at line 251 of file Table.php.

Referenced by ILIAS\LegalDocuments\Legacy\Table\removeModals(), and ILIAS\LegalDocuments\Legacy\Table\renderModals().

251  : array
252  {
253  return is_array($x) ? $x : [$x];
254  }
+ Here is the caller graph for this function:

◆ asString()

ILIAS\LegalDocuments\Legacy\Table::asString (   $x)
private
Parameters
Component|list<Component>|Closure|string$x

Definition at line 156 of file Table.php.

References $DIC, and ILIAS\LegalDocuments\Legacy\Table\removeModals().

Referenced by ILIAS\LegalDocuments\Legacy\Table\tableCellOfField().

156  : string
157  {
158  $is_component = fn($x): bool => $x instanceof Component;
159 
160  if ($is_component($x) || (is_array($x) && array_filter($x, fn($x) => !$is_component($x)) === [])) {
161  global $DIC;
162  return $DIC->ui()->renderer()->render($this->removeModals($x));
163  } elseif ($x instanceof Closure) {
164  return $x();
165  } elseif (is_string($x)) {
166  return htmlentities($x);
167  }
168 
169  throw new InvalidArgumentException('Value must be either: Component|list<Component>|Closure|string. Given: ' . var_export($x, true));
170  }
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ diff()

ILIAS\LegalDocuments\Legacy\Table::diff ( array  $a,
array  $b 
)
private

Definition at line 190 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\has().

Referenced by ILIAS\LegalDocuments\Legacy\Table\requireKeys().

190  : array
191  {
192  return array_filter($a, fn($x) => !$this->has($x, $b));
193  }
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRow()

ILIAS\LegalDocuments\Legacy\Table::fillRow ( array  $a_set)
protected

Definition at line 141 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\requireKeys(), ILIAS\LegalDocuments\Legacy\Table\tableCellOfField(), and ILIAS\LegalDocuments\Legacy\Table\visibleColumns().

141  : void
142  {
143  $this->requireKeys(array_keys($this->columns), $a_set);
144  $set = array_intersect_key($a_set, $this->visibleColumns());
145  $this->tpl->setVariable('VALUE', join('', array_map($this->tableCellOfField(...), $set)));
146  }
requireKeys(array $required, array $given)
Definition: Table.php:181
+ Here is the call graph for this function:

◆ filter()

ILIAS\LegalDocuments\Legacy\Table::filter ( )
Returns
array<string, mixed>

Implements ILIAS\LegalDocuments\TableSelection.

Definition at line 94 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\filterInputs().

94  : array
95  {
96  return array_column(array_map(
97  fn($input) => [
98  $input->getPostVar(),
99  $input->getValue()
100  ],
101  $this->filterInputs()
102  ), 1, 0);
103  }
+ Here is the call graph for this function:

◆ filterInputs()

ILIAS\LegalDocuments\Legacy\Table::filterInputs ( )
private

Definition at line 205 of file Table.php.

Referenced by ILIAS\LegalDocuments\Legacy\Table\filter().

205  : array
206  {
207  return [
208  ...$this->getFilterItems(),
209  ...$this->getFilterItems(true),
210  ];
211  }
+ Here is the caller graph for this function:

◆ flatMap()

ILIAS\LegalDocuments\Legacy\Table::flatMap ( callable  $proc,
array  $a 
)
private

Definition at line 246 of file Table.php.

Referenced by ILIAS\LegalDocuments\Legacy\Table\renderModals().

246  : array
247  {
248  return array_merge(...array_values(array_map($proc, $a)));
249  }
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
+ Here is the caller graph for this function:

◆ getSelectableColumns()

ILIAS\LegalDocuments\Legacy\Table::getSelectableColumns ( )

Definition at line 86 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\selection().

86  : array
87  {
88  return array_map(fn($x) => ['txt' => $x[0]], array_intersect_key(
89  $this->columns,
90  $this->selection()
91  ));
92  }
+ Here is the call graph for this function:

◆ has()

ILIAS\LegalDocuments\Legacy\Table::has (   $x,
array  $array 
)
private

Definition at line 200 of file Table.php.

Referenced by ILIAS\LegalDocuments\Legacy\Table\diff(), and ILIAS\LegalDocuments\Legacy\Table\intersect().

200  : bool
201  {
202  return in_array($x, $array, true);
203  }
+ Here is the caller graph for this function:

◆ intersect()

ILIAS\LegalDocuments\Legacy\Table::intersect ( array  $a,
array  $b 
)
private

Definition at line 195 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\has().

Referenced by ILIAS\LegalDocuments\Legacy\Table\requireKeys().

195  : array
196  {
197  return array_filter($a, fn($x) => $this->has($x, $b));
198  }
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isColumnVisible()

ILIAS\LegalDocuments\Legacy\Table::isColumnVisible ( int  $index)
protected

Definition at line 110 of file Table.php.

110  : bool
111  {
112  return true;
113  }

◆ isModal()

ILIAS\LegalDocuments\Legacy\Table::isModal (   $x)
private

Definition at line 256 of file Table.php.

Referenced by ILIAS\LegalDocuments\Legacy\Table\removeModals(), and ILIAS\LegalDocuments\Legacy\Table\renderModals().

256  : bool
257  {
258  return $x instanceof Modal;
259  }
+ Here is the caller graph for this function:

◆ removeModals()

ILIAS\LegalDocuments\Legacy\Table::removeModals (   $x)
private

Definition at line 241 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\asArray(), and ILIAS\LegalDocuments\Legacy\Table\isModal().

Referenced by ILIAS\LegalDocuments\Legacy\Table\asString().

241  : array
242  {
243  return array_filter($this->asArray($x), fn($x) => !$this->isModal($x));
244  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ render()

ILIAS\LegalDocuments\Legacy\Table::render ( )

Definition at line 105 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\renderModals().

105  : string
106  {
107  return parent::render() . $this->renderModals();
108  }
+ Here is the call graph for this function:

◆ renderModals()

ILIAS\LegalDocuments\Legacy\Table::renderModals ( )
private

Definition at line 231 of file Table.php.

References $DIC, ILIAS\LegalDocuments\Legacy\Table\asArray(), ILIAS\LegalDocuments\Legacy\Table\flatMap(), ilTable2GUI\getData(), and ILIAS\LegalDocuments\Legacy\Table\isModal().

Referenced by ILIAS\LegalDocuments\Legacy\Table\render().

231  : string
232  {
233  global $DIC;
234 
235  return $DIC->ui()->renderer()->render($this->flatMap(
236  fn($x) => $this->flatMap(fn($x) => array_filter($this->asArray($x), $this->isModal(...)), $x),
237  $this->getData()
238  ));
239  }
flatMap(callable $proc, array $a)
Definition: Table.php:246
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ requireKeys()

ILIAS\LegalDocuments\Legacy\Table::requireKeys ( array  $required,
array  $given 
)
private
Parameters
list<string>$required
array<string,mixed>$given

Definition at line 181 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\diff(), and ILIAS\LegalDocuments\Legacy\Table\intersect().

Referenced by ILIAS\LegalDocuments\Legacy\Table\fillRow().

181  : void
182  {
183  $given = array_keys($given);
184  $missing = $this->intersect($required, $this->diff($required, $given));
185  if ([] !== $missing) {
186  throw new InvalidArgumentException('Missing keys: ' . join(', ', $missing));
187  }
188  }
intersect(array $a, array $b)
Definition: Table.php:195
diff(array $a, array $b)
Definition: Table.php:190
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetParameters()

ILIAS\LegalDocuments\Legacy\Table::resetParameters ( array  $parameters)
private
Parameters
array<string,mixed>$parameters

Definition at line 126 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\applyParamters().

126  : void
127  {
128  $this->applyParamters(array_map(static fn(): string => '', $parameters));
129  }
applyParamters(array $parameters)
Definition: Table.php:134
+ Here is the call graph for this function:

◆ selection()

ILIAS\LegalDocuments\Legacy\Table::selection ( )

Definition at line 81 of file Table.php.

Referenced by ILIAS\LegalDocuments\Legacy\Table\getSelectableColumns(), and ILIAS\LegalDocuments\Legacy\Table\visibleColumns().

81  : array
82  {
83  return array_flip($this->sel);
84  }
+ Here is the caller graph for this function:

◆ setMaxCount()

ILIAS\LegalDocuments\Legacy\Table::setMaxCount ( int  $a_max_count)

Implements ILIAS\LegalDocuments\TableSelection.

Definition at line 70 of file Table.php.

References ilTable2GUI\setShowRowsSelector().

70  : void
71  {
72  $this->setShowRowsSelector(true);
73  parent::setMaxCount($a_max_count);
74  }
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
+ Here is the call graph for this function:

◆ setSelectableColumns()

ILIAS\LegalDocuments\Legacy\Table::setSelectableColumns ( string ...  $names)

Definition at line 76 of file Table.php.

76  : void
77  {
78  $this->sel = array_merge($this->sel, $names);
79  }

◆ setupFilter()

ILIAS\LegalDocuments\Legacy\Table::setupFilter ( string  $reset_command)

Definition at line 213 of file Table.php.

References $DIC, ilTable2GUI\determineSelectedFilters(), ilTable2GUI\getFilterItems(), ilTable2GUI\getParentCmd(), ilFormPropertyGUI\getPostVar(), ilTable2GUI\initFilter(), ilTable2GUI\isFilterSelected(), ilFormPropertyGUI\readFromSession(), ilTable2GUI\resetFilter(), ilTable2GUI\setFilterCommand(), ilTable2GUI\setResetCommand(), and ilTable2GUI\writeFilterToSession().

213  : void
214  {
215  global $DIC;
216  $this->initFilter();
217  $this->setFilterCommand($this->getParentCmd());
218  $this->setResetCommand($reset_command);
219  $this->determineSelectedFilters();
220  if ($DIC->ctrl()->getCmd() === $reset_command) {
221  $this->resetFilter();
222  } elseif (strtoupper($DIC->http()->request()->getMethod()) === 'POST') {
223  $this->writeFilterToSession();
224  } else {
225  $read = static fn(ilFormPropertyGUI $x) => $x->readFromSession();
226  array_map($read, $this->getFilterItems());
227  array_map($read, array_filter($this->getFilterItems(true), fn($x) => $this->isFilterSelected($x->getPostVar())));
228  }
229  }
setResetCommand(string $a_val, string $a_caption="")
isFilterSelected(string $a_col)
Is given filter selected?
setFilterCommand(string $a_val, string $a_caption="")
global $DIC
Definition: shib_login.php:22
getFilterItems(bool $a_optionals=false)
+ Here is the call graph for this function:

◆ tableCellOfField()

ILIAS\LegalDocuments\Legacy\Table::tableCellOfField (   $x)
protected

Definition at line 148 of file Table.php.

References ILIAS\LegalDocuments\Legacy\Table\asString().

Referenced by ILIAS\LegalDocuments\Legacy\Table\fillRow().

148  : string
149  {
150  return sprintf('<td>%s</td>', $this->asString($x));
151  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ txt()

ILIAS\LegalDocuments\Legacy\Table::txt ( string  $key)
protected

Definition at line 172 of file Table.php.

References ILIAS\Repository\lng().

172  : string
173  {
174  return $key === '' ? '' : $this->lng->txt($key);
175  }
+ Here is the call graph for this function:

◆ visibleColumns()

ILIAS\LegalDocuments\Legacy\Table::visibleColumns ( )
private

Definition at line 115 of file Table.php.

References ilTableGUI\$base, ilTable2GUI\getSelectedColumns(), and ILIAS\LegalDocuments\Legacy\Table\selection().

Referenced by ILIAS\LegalDocuments\Legacy\Table\__construct(), and ILIAS\LegalDocuments\Legacy\Table\fillRow().

115  : array
116  {
117  $restore_key_order = fn($array) => array_intersect_key($this->columns, $array);
118  $base = array_diff_key($this->columns, $this->selection());
119 
120  return $restore_key_order(array_merge($base, array_intersect_key($this->columns, $this->getSelectedColumns())));
121  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $columns

readonly array ILIAS\LegalDocuments\Legacy\Table::$columns
private

Definition at line 38 of file Table.php.

◆ $sel

array ILIAS\LegalDocuments\Legacy\Table::$sel = []
private

Definition at line 40 of file Table.php.


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