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
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 158
__construct($unique_id = false)
No description
in
UIComponent at line 324
string
__toString()
No description
at line 967
add_additional_listener(string $field, string $event, mixed $event_handler, array $params = array())
No description
at line 811
void
add_field(string $field, array $params)
No description
at line 1561
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 1621
array
create_tree_path(array $tree_array = null, int $node_id = 0)
No description
at line 228
disable_form()
No description
at line 471
string
display()
No description
at line 225
enable_checkboxes()
No description
at line 1457
bool
fill_by_array($array, $reset = true)
No description
at line 1412
fill_by_callback($callback, $lazy_loading = false, $preload_levels = 2, $callback_returns_has_children = false)
No description
at line 303
void
fill_by_sql(string $query)
Fill Tree by query Required fields in the query: id, pid, caption Optional: class
in
UIComponent at line 185
mixed
get($var)
Get Variable / Option
at line 1187
int
getRootPid()
Getter for the root id
at line 342
get_checked_nodes()
No description
at line 1284
array
get_childs(int $id, bool|int $levels = false, bool $is_in_recursion = false)
No description
at line 211
mixed
get_current_id()
Get currently selected Node ID This works only properly AFTER process()
at line 1399
mixed
get_element(bool|int $id = false)
No description
at line 976
array
get_flat_tree($pid = 0, $depth = 0, $current_id = false, $parent_label = false, $is_in_recursion = false)
No description
at line 179
Form
get_form()
No description
at line 1252
array
get_parents($id)
No description
at line 1380
array
get_siblings(int $id)
Returns an array with all sibling IDs
in
UIComponent at line 202
string
get_unique_dom_id()
Generates a unique dom id, dependent on the provided UID, as well as the current context.
at line 322
string
get_unique_id()
No description
in
UIComponent at line 289
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 1015
load_tree_array($pid = false, $levels = false)
No description
in
UIComponent at line 221
string
parse_template(string $template_content, array|bool $marker_array = false)
No description
in
UIComponent at line 234
string|null
parse_template_cb_wrapper(mixed $matches)
No description
in
UIComponent at line 260
mixed|string
parse_xtag($xml_source)
No description
at line 357
process(bool $render_form = true)
No description
at line 1528
render()
No description
at line 1352
string
render_as_ul_list(mixed $parent_id = 0, mixed $levels = false, mixed $options = array())
Render Tree as UL List
in
UIComponent at line 268
mixed
render_xtag_element()
No description
in
UIComponent at line 173
void
reset_marker_content()
restores original content of marker_content
in
UIComponent at line 106
void
set(mixed $var, mixed $value = false)
Set Variable / Option
at line 1196
void
setRootPid(int $rootPid)
Setter for the root id
in
UIComponent at line 122
void
set_array(mixed $member_array, mixed $vars)
Set Variable / Option for an array
at line 1654
set_caption(string $label)
Set Caption Label
at line 1645
set_caption_i18n(string $label)
Set Caption Label (i18n Mode)
in
UIComponent at line 165
void
set_marker_content(mixed $marker_content = false)
sets marker_content to passed data -> restore original content with reset_marker_content()
at line 330
set_max_levels($levels)
No description
in
UIComponent at line 90
set_mod(mixed $mod)
Set link to owning module
at line 278
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 221
void
set_option(string $option, bool $enabled = true)
Set a Tree Option
in
UIComponent at line 135
void
set_render_params(mixed $input_params = array())
Used to inject params. Only allowed params will be used (see $allowed_params_filter)
at line 238
set_selected(array $node_ids = array(), bool $forced = false)
Declare already selected nodes
at line 338
set_start_levels($levels)
No description
at line 254
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