Property |
Type |
Description |
|
$alertFadeDuration |
|
animation duration (ms) for fading in and out alerts that are displayed during manipulation of nodes. |
|
$allowNewRoots |
|
allow new root creation. |
|
$autoLoadBsPlugin |
|
whether to auto load the bootstrap plugin assets if showTooltips is true OR if
TreeViewInput::asDropdown is true. Defaults to true. |
|
$breadcrumbs |
|
the breadcrumbs settings for displaying the current node title based on parent hierarchy in the node
details form/view (starting from the current node). The following settings are supported:
- depth: int, the depth to dig into the parent nodes for fetching the breadcrumb titles. If set to null or
0 this will fetch breadcrumbs till infinite parent depth. Defaults to null.
- glue: string, the separator to glue each node name within the breadcrumbs. Defaults to › .
- activeCss: string, the CSS class to be applied to the current node name in the breadcrumbs. Defaults to
kv-crumb-active.
- untitled: string, the title to be displayed if this is a new untitled node record. Defaults to Untitled. |
|
$buttonGroupOptions |
|
the HTML attributes for the button groups within the toolbar. |
|
$buttonIconOptions |
|
the default HTML attributes for the toolbar button icons |
|
$buttonOptions |
|
the default HTML attributes for the toolbar buttons |
|
$cacheSettings |
|
cache settings for displaying the detail form content for each tree node via ajax. The following
options are supported:
- enableCache: bool, defaults to true.
- cacheTimeout: int, the cache timeout in milliseconds. Defaults to 300000 (or 5 minutes). |
|
$checkedNodeOptions |
|
the HTML attributes for the indicator which will represent a checked checkbox. The following special
options are recognized:
- 'label': string, the label for the indicator. If not set will default to:
- if fontAwesome is true
- if fontAwesome is false |
|
$childNodeIconOptions |
|
the HTML attributes for the child node icon. |
|
$clientMessages |
|
the configuration of various client alert messages |
|
$collapseNodeOptions |
|
the HTML attributes for the indicator for collapsing a node. The following special options are
recognized:
- 'label': string, the label for the indicator. If not set will default to:
- if fontAwesome is true
- if fontAwesome is false |
|
$defaultChildNodeIcon |
|
the icon markup for the child node if no icon was setup in the database. |
|
$defaultParentNodeIcon |
|
the icon markup for the collapsed parent node if no icon was setup in the database. |
|
$defaultParentNodeOpenIcon |
|
the icon markup for the opened parent node if no icon was setup in the database. |
|
$detailOptions |
|
the HTML attributes for the detail form container which will display the details of the selected node |
|
$displayValue |
|
the initial value (key) to be selected in the tree and displayed in the detail form. Defaults to 1. |
|
$emptyNodeMsg |
|
message shown on tree initialization when either the entire tree is empty or no node is found for
the selected displayValue. |
|
$emptyNodeMsgOptions |
|
HTML attributes for the empty node message displayed. |
|
$expandNodeOptions |
|
the HTML attributes for the indicator for expanding a node. The following special options are
recognized:
- 'label': string, the label for the indicator. If not set will default to:
- if fontAwesome is true
- if fontAwesome is false |
|
$fontAwesome |
|
whether to use font awesome icons. Defaults to false. |
|
$footerOptions |
|
the HTML attributes for the tree footer container. |
|
$footerTemplate |
|
the template for rendering the footer |
|
$headerOptions |
|
the HTML attributes for the tree header container |
|
$headerTemplate |
|
the template for rendering the header |
|
$headingOptions |
|
the HTML attributes for the heading. The following additional option is recognized:
label: the label to display for the heading |
|
$iconEditSettings |
|
settings to edit the icon. The following settings are recognized:
- show: string, whether to display the icons selection as a list. If set to 'text', the icon will be shown as a
plain text input along with icon type. If set to 'list', a list will be shown. If set to 'none', then no
icon settings will be shown for editing.
- type: string, the iconTypeAttribute value, defaults to TreeView::ICON_CSS. Should be one of TreeView::ICON_CSS
or TreeView::ICON_RAW.
- listData: array, the configuration of the icon list data to be shown for selection. This is mandatory if you
set show to 'list'. You must set the data as $key => $value format. The list will be parsed to display
the icon list and will depend on the type.
- If type = TreeView::ICON_CSS: $key will be the icon suffix name and $value will be the description for
the icon. The icon markup will be automatically parsed then based on whether its a glyphicon or font-awesome
when fontAwesome property is true. For example:
[
'folder-close' => 'Folder',
'file' => 'File',
'tag' => 'Tag'
]
- If type = TreeView::ICON_RAW: $key is the icon markup to be stored and $value is the output markup to
be displayed as a selection in the list. For example:
[
'' => 'Folder',
'' => 'File',
'' => 'Tag',
]
|
|
$isAdmin |
|
whether the tree is to be allowed for editing in admin mode. This will display all nodes and will
allow to modify internal tree node flags. Defaults to false. |
|
$mainTemplate |
|
the main template for rendering the tree view navigation widget and the node detail view form. |
|
$multiple |
|
whether to allow multiple selection of checkboxes. Defaults to true. If set to false will not show
a checkbox and allow only single selection of tree nodes. |
|
$nodeActions |
|
the actions for managing, deleting, and moving the tree nodes. The keys must be one of 'manage',
'save', 'remove', and 'move'. Defaults to:
[
'save' => Url::to(['/treemanager/node/save']),
'manage' => Url::to(['/treemanager/node/manage']),
'remove' => Url::to(['/treemanager/node/remove']),
'move' => Url::to(['/treemanager/node/move']),
]
|
|
$nodeAddlViews |
|
the list of additional view files that will be used to append content at various sections in the
nodeView form. |
|
$nodeCheckboxOptions |
|
the HTML attributes for the node checkbox indicator for all items in the tree |
|
$nodeFormOptions |
|
the HTML attributes for the node detail form. |
|
$nodeLabel |
|
the value to customize a tree node's label.
- if set as an array, the array key must be the node key value (i.e. keyAttribute) and array value will be the
new node label you want to assign.
- if set as a Closure, the callback function must be of the signature function($node)}, where $node will
represent each tree node's model object instance.
If a value is not traceable through above methods, the database tree node name will be displayed (as parsed via
nameAttribute). |
|
$nodeToggleOptions |
|
the HTML attributes for the node toggle indicator for each parent item in the tree |
|
$nodeView |
|
the view file that will render the form for editing the node. |
|
$options |
|
the HTML attributes for the input that will store the selected nodes for the widget |
|
$parentNodeIconOptions |
|
the HTML attributes for the parent node icon. |
|
$query |
|
the query that will be used as the data source for the TreeView. For example:
Tree::find()->addOrderBy('root, lft') |
|
$rootNodeCheckboxOptions |
|
the HTML attributes for the root node's checkbox indicator |
|
$rootNodeToggleOptions |
|
the HTML attributes for the root node's toggle indicator |
|
$rootOptions |
|
the HTML attributes for the topmost root node container. The following special options are
recognized:
- label: string, the label for the topmost root node (this is not HTML encoded). Defaults to 'Root'. Set this to
empty to not display a label. |
|
$searchClearOptions |
|
the HTML attributes for the search clear indicator |
|
$searchContainerOptions |
|
the HTML attributes for the search container |
|
$searchOptions |
|
the HTML attributes for the search input |
|
$showCheckbox |
|
whether to show a checkbox before each tree node label to allow multiple node selection. |
|
$showFormButtons |
|
whether to show the form action buttons in the node details form/view. |
|
$showIDAttribute |
|
whether to show the key attribute (ID) in the node details form/view. |
|
$showInactive |
|
whether to show inactive nodes |
|
$showTooltips |
|
show toolbar button tooltips (using bootstrap tooltip plugin). The BootstrapPluginAsset will
automatically be loaded if this is set to true. |
|
$softDelete |
|
whether the record will be soft deleted, when remove button is clicked. Defaults to true. The
following actions are possible:
- If true, this will just set the active property of node to false.
- If false, it will attempt to hard delete the whole record. |
|
$toolbar |
|
the settings for the tree management toolbar |
|
$toolbarOptions |
|
the HTML attributes for the toolbar. |
|
$toolbarOrder |
|
the sorting order of the buttons in the toolbar. Each item in this array should be one of the button
keys as set in the toolbar array keys (except for BTN_SEPARATOR which will be parsed as is). Note that,
if this is set, then only the button keys configured here will be displayed (irrespective of the toolbar
setup). Hence one must ensure that all the toolbar button keys are set here to display all the toolbar
buttons. |
|
$treeOptions |
|
the HTML attributes for the tree selector container |
|
$treeWrapperOptions |
|
the HTML attributes for the wrapper container for the tree header, body, and footer. |
|
$uncheckedNodeOptions |
|
the HTML attributes for the indicator which will represent an unchecked checkbox. The
following special options are recognized:
- 'label': string, the label for the indicator. If not set will default to:
- if fontAwesome is true
- if fontAwesome is false |
|
$value |
|
the comma separated initial value (keys) to be checked and selected in the tree |
|
$wrapperTemplate |
|
the wrapper template for rendering the tree view navigation widget |
|