Tree
class Tree extends UIComponent
Constants
| SYSTEM_TEMPLATE_UI_FOLDER |
|
Properties
| Link | $xf_link | from UIComponent | |
| string | $link_id | from UIComponent | |
| array | $GPvars | from UIComponent | |
| Controller | $mod | from UIComponent | |
| protected array | $local_template_marker | from UIComponent | |
| protected bool | $_overwrite_param_array | from UIComponent | |
| 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 |
| $id_field | |||
| $pid_field | |||
| $uid_field | |||
| mixed | $group_field | Supply the group field to filter the tree by group |
|
| $group_id | |||
| $table_query | |||
| $caption_field | |||
| $caption_label | |||
| $caption_label_i18n | |||
| string | $sort_field | Table field used for sorting of items, set to e.g. 'sort' to enable sorting of items |
|
| $link_field | |||
| $css_item_class | |||
| $css_icon_class | |||
| array | $options | ||
| $onDelete | |||
| $onRename | |||
| $onAdd | |||
| $delete_recursively | |||
| $current_id |
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Fill Tree by query Required fields in the query: id, pid, caption Optional: class
Getter for the root id
No description
No description
Get currently selected Node ID This works only properly AFTER process()
No description
No description
No description
Returns an array with all sibling IDs
Generates a unique dom id, dependent on the provided UID, as well as the current context.
No description
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
No description
Render Tree as UL List
No description
Setter for the root id
Set Variable / Option for an array
Set Caption Label
Set Caption Label (i18n Mode)
sets marker_content to passed data -> restore original content with reset_marker_content()
No description
Set a Tree Option
Used to inject params. Only allowed params will be used (see $allowed_params_filter)
Declare already selected nodes
No description
No description
Details
at line 161
__construct($unique_id = false)
No description
in
UIComponent at line 328
string
__toString()
No description
at line 1014
add_additional_listener(string $field, string $event, callable $event_handler, array $params = array())
No description
at line 832
void
add_field(string $field, array $params)
No description
at line 1599
array
create_tree_array(string $table, string $id_field = 'id', string $pid_field = 'pid', array|bool $group_ids = false, bool|string $is_root_field = false, mixed $context_id = false)
No description
at line 1659
array
create_tree_path(array $tree_array = null, int $node_id = 0)
No description
at line 242
disable_form()
No description
at line 492
string
display()
No description
at line 239
enable_checkboxes()
No description
at line 1495
bool
fill_by_array($array, $reset = true)
No description
at line 1450
fill_by_callback($callback, $lazy_loading = false, $preload_levels = 2, $callback_returns_has_children = false)
No description
at line 317
void
fill_by_sql(string $query)
Fill Tree by query Required fields in the query: id, pid, caption Optional: class
in
UIComponent at line 187
mixed
get($var)
Get Variable / Option
at line 1226
int
getRootPid()
Getter for the root id
at line 356
get_checked_nodes()
No description
at line 1323
array
get_childs(int $id, bool|int $levels = false, bool $is_in_recursion = false)
No description
at line 214
mixed
get_current_id()
Get currently selected Node ID This works only properly AFTER process()
at line 1437
mixed
get_element(bool|int $id = false)
No description
at line 1023
array
get_flat_tree($pid = 0, $depth = 0, $current_id = false, $parent_label = false, $is_in_recursion = false)
No description
at line 182
Form
get_form()
No description
at line 1291
array
get_parents($id)
No description
at line 1419
array
get_siblings(int $id)
Returns an array with all sibling IDs
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.
at line 336
string
get_unique_id()
No description
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
in
UIComponent at line 72
init()
put your comment there.
..
at line 1062
load_tree_array($pid = false, $levels = false)
No description
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
at line 371
process(bool $render_form = true)
No description
at line 1566
render()
No description
at line 1391
string
render_as_ul_list(mixed $parent_id = 0, mixed $levels = false, mixed $options = array())
Render Tree as UL List
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 225
void
setCurrentId(int $currentId)
No description
at line 1235
void
setRootPid(int $rootPid)
Setter for the root id
in
UIComponent at line 124
void
set_array(mixed $member_array, mixed $vars)
Set Variable / Option for an array
at line 1692
set_caption(string $label)
Set Caption Label
at line 1683
set_caption_i18n(string $label)
Set Caption Label (i18n Mode)
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()
at line 344
set_max_levels($levels)
No description
in
UIComponent at line 90
set_mod(mixed $mod)
Set link to owning module
at line 292
set_model(Model $model, string $caption_field = false, string $id_field = false, string $pid_field = false, string $uid_field = false, int $group_field = false, array $group_id = false, mixed $additional_select_fields = false)
Define the model to get tree information from
at line 235
void
set_option(string $option, bool $enabled = true)
Set a Tree Option
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)
at line 252
set_selected(array $node_ids = array(), bool $forced = false)
Declare already selected nodes
at line 352
set_start_levels($levels)
No description
at line 268
set_table(string $table, bool|string $caption_field = false, bool|string $id_field = false, bool|string $pid_field = false, bool|string $uid_field = false, bool|int $group_field = false, array|bool $group_id = false, bool $additional_select_fields = false)
No description