Table
class Table extends UIComponent
Constants
| SYSTEM_TEMPLATE_UI_FOLDER |
|
Properties
| Link | $xf_link | from UIComponent | |
| $link_id | |||
| $GPvars | |||
| Core | $mod | ||
| protected array | $local_template_marker | from UIComponent | |
| protected | $_overwrite_param_array | ||
| protected bool|array|ModelCollection | $marker_content | from UIComponent | |
| string | $mod_object_manager | from UIComponent | |
| protected bool | $_orig_marker_content | from UIComponent | |
| protected array | $_allowed_params_filter | from UIComponent | |
| string | $unique_dom_id | from UIComponent | |
| protected string | $uid | from UIComponent | |
| string read-only | $_content | When used in template this property will contain the XML/HTML within the XUI Nodes |
from UIComponent |
| protected | $process_priority | ||
| protected | $process_queue_id | ||
| protected | $process_queue | ||
| $order_by | |||
| $order_field | |||
| $start | |||
| $limit | |||
| string | $order_field_secondary | ||
| $order_fields | |||
| $pre_ordered | |||
| $new_order_field | |||
| $new_order_by | |||
| $new_start | |||
| $sql_order_fields | |||
| $field_filter | |||
| $show_table_options | |||
| $show_optional_fields | |||
| $show_record_count | |||
| $hidden_array_sort_field | |||
| $hide_head_rows | |||
| $order_array | |||
| $fields_visible | |||
| $field_tooltips | |||
| $grouping | |||
| $group_type | |||
| $no_record_message | |||
| array | $rows | ||
| int | $rows_total | ||
| protected | $xtag_params | ||
| protected | $large_export | ||
| string | $export_filename | When exported the file will have the name provided here. |
|
| array | $cmd_array |
Methods
No description
Schedule Add Callback to Table Col (Will transform an existing col)
Register Actions with the table object
Schedule Add Col to Table
Schedule Add Callback to Table Col (Will transform an existing col)
Simple Replace Function to be used in callbacks
Add Single Row Object to Table
No description
No description
No description
No description
Enable periodical update (JS function)
No description
No description
No description
Export (get_table-Alias)
Schedule Fill table by array
No description
Fill Table with Query
Return the current table command which where given encoded via _GET params for this table instance
Returns the table id.
Returns the selected IDs in a multi action table.
No description
No description
Return Page Control
Get HTML Table
Generates a unique dom id, dependent on the provided UID, as well as the current context.
Return new template view If using within module xui the tpl file should be named [class_name].tpl e.g. xui_core_table.tpl within the module's template folder
No description
No description
No description
Sets a callback or closure to manipulate the $this->filter_field array after the array has been initially build during an export action ($this->>action = "export").
Set cols to be hidden in output
Set cols to be visible in output
Registered a callback that will be called after the rows have been limited, passing the resulting row array as it's only parameter. The return of the callback can be used in any low-prio callback using the field 'field:_additional_data'. You should use this callback to load additional information required in the table that for some reason cannot be loaded in the fillby* Method, for example because you are using models and the data is from a foreign table.
Set Variable / Option for an array
Allow use of Caches (e.g. Query Cache)
No description
No description
Set formatting parameters for each column
Set Responsive COLs (Other cols wil be hidden if given responsive level is reached)
No description
set all fields that shall be exported
No description
No description
sets marker_content to passed data -> restore original content with reset_marker_content()
No description
No description
Used to inject params. Only allowed params will be used (see $allowed_params_filter)
Details
at line 199
__construct(string|bool $table_id = false, array $table_attributes = array())
No description
in
UIComponent at line 328
string
__toString()
No description
at line 1756
void
_add_col_callback_to_q(string $field, mixed $callback, mixed $cb_params, string $type = "body")
Schedule Add Callback to Table Col (Will transform an existing col)
at line 2673
TableActionHandler
actions()
Register Actions with the table object
at line 599
void
add_col(string $field, string $value, mixed $attributes = array(), $type = "body")
Schedule Add Col to Table
at line 617
void
add_col_callback(string $field, callable $callback, array $cb_params = array(), string $type = "body", string $priority = 'auto')
Schedule Add Callback to Table Col (Will transform an existing col)
at line 661
add_col_replace(mixed $field, array $replace, bool $regex = false, string $type = "body", string $priority = 'auto')
Simple Replace Function to be used in callbacks
$table->add_col_replace('city',array('*'=>array('field:zip_code',' ','field:city')));
at line 582
void
add_row(array $record, string $type = "body", bool|string $class = false)
Add Single Row Object to Table
at line 1477
cb_property($matches)
No description
at line 2662
deactivateAjax()
No description
at line 322
void
enable_grouping(array|bool $fields = true, bool $hide_group_col = false)
No description
at line 245
enable_optional_fields(array $fields, array|bool $visible_fields = false)
No description
at line 290
enable_periodical_update(int $interval = 10)
Enable periodical update (JS function)
at line 409
enable_select_column(string $select_field, bool $multi_select = true, string|bool $field_name = false, array $condition = [])
No description
at line 279
void
enable_table_options(bool $large_export = false, int $large_export_limit = 100)
No description
at line 301
void
enable_tooltips(array $field_descriptions)
No description
at line 930
string
export(string $export_format = 'csv')
Export (get_table-Alias)
at line 532
void
fillByModelCollection(ModelCollection $collection)
Use collection as source for table data
at line 554
fillByQuery(Query $query)
No description
at line 548
void
fill_by_array(mixed $row_array, string $array_format = "assoc", string $type = "body")
Schedule Fill table by array
at line 502
fill_by_callback($callback)
No description
at line 514
fill_by_model_find(Model|ModelCollection $model, string $find_function = 'all')
No description
at line 491
void
fill_by_sql(string $pquery, array $params = array(), string $type = "body", bool $language = false)
Fill Table with Query
in
UIComponent at line 187
mixed
get($var)
Get Variable / Option
at line 2630
array
getCMDArray()
Return the current table command which where given encoded via _GET params for this table instance
at line 230
string
getId()
Returns the table id.
at line 709
array
getSelectedIds()
Returns the selected IDs in a multi action table.
at line 2655
mixed
getTableUid()
No description
at line 1234
string
get_action()
No description
at line 2401
string
get_page_control()
Return Page Control
at line 1089
string
get_table(string $export_format = null)
Get HTML Table
in
UIComponent at line 204
string
get_unique_dom_id()
Generates a unique dom id, dependent on the provided UID, as well as the current context.
in
UIComponent at line 294
Template|null
get_view(string|bool $section = false)
Return new template view If using within module xui the tpl file should be named [class_name].tpl e.g. xui_core_table.tpl within the module's template folder
at line 310
hide_head_rows(mixed $hide = true)
No description
in
UIComponent at line 72
init()
put your comment there.
..
in
UIComponent at line 223
string
parse_template(string $template_content, array|bool $marker_array = false)
No description
in
UIComponent at line 239
string|null
parse_template_cb_wrapper(mixed $matches)
No description
in
UIComponent at line 265
mixed|string
parse_xtag($xml_source)
No description
in
UIComponent at line 339
process()
Declared in Classes
at line 762
render()
No description
in
UIComponent at line 273
mixed
render_xtag_element()
No description
in
UIComponent at line 175
void
reset_marker_content()
restores original content of marker_content
in
UIComponent at line 108
void
set(mixed $var, mixed $value = false)
deprecated
deprecated
Set Variable / Option
at line 702
void
setExportFieldManipulatorCallback(callable|Closure $callback)
Sets a callback or closure to manipulate the $this->filter_field array after the array has been initially build during an export action ($this->>action = "export").
Signature: function(array $filterFields) { return $filterFields; }
at line 360
setHiddenFields(array $fields = [])
Set cols to be hidden in output
at line 352
setVisibleFields(array $fields = [])
Set cols to be visible in output
at line 689
set_additional_data_callback(mixed $callback)
Registered a callback that will be called after the rows have been limited, passing the resulting row array as it's only parameter. The return of the callback can be used in any low-prio callback using the field 'field:_additional_data'. You should use this callback to load additional information required in the table that for some reason cannot be loaded in the fillby* Method, for example because you are using models and the data is from a foreign table.
in
UIComponent at line 124
void
set_array(mixed $member_array, mixed $vars)
Set Variable / Option for an array
at line 386
set_cache(int|bool $ttl = false)
Allow use of Caches (e.g. Query Cache)
at line 434
set_column_attributes($attributes, $type = 'body')
No description
at line 471
void
set_column_class(array $col_class, string $type = 'body')
No description
at line 429
void
set_column_format(array $formatting_options, $type = 'body')
Set formatting parameters for each column
$formatting_options['field1']=array("format"=>"money",
"suffix"=>"EUR");
at line 445
set_column_responsive(array $responsive_cols, string $responsive_level = 'smartphone')
Set Responsive COLs (Other cols wil be hidden if given responsive level is reached)
at line 476
set_column_tooltips($tooltips)
No description
at line 2621
set_export_filter(array|null $filter = null)
set all fields that shall be exported
at line 337
void
set_grouping(string $field, bool $hide_group_col = false)
No description
at line 397
void
set_limit(int $limit)
No description
in
UIComponent at line 167
void
set_marker_content(mixed $marker_content = false)
sets marker_content to passed data -> restore original content with reset_marker_content()
in
UIComponent at line 90
set_mod(mixed $mod)
Set link to owning module
at line 374
void
set_order(string $field, string $direction = 'ASC', array $order_fields = null, string|bool $secondary_order_field = false)
No description
at line 212
void
set_params(string|bool $table_id = false, array $table_attributes = array())
No description
in
UIComponent at line 137
void
set_render_params(mixed $input_params = array())
Used to inject params. Only allowed params will be used (see $allowed_params_filter)