extends |
Control |
|---|
Display items in a hierarchical (tree) view structure.
When an item contains nodes with non empty values, it will automatically be treat as a group level;
The input value is store as an array type when allowMultiple is set to true, otherwise, will store one single value when set to false.
Only item ID are store within the input field.
see demos/tree-item-selector.php to see how tree items are build.
| Methods | ||
|---|---|---|
protected
|
init(): void
|
# |
public
|
onItem(Closure(mixed): (JsExpressionable|View|string|void) $fx): void
|
# |
public
|
getInput(): string
|
# |
public
|
getValue(): string|null
|
# |
protected
|
renderView(): void
|
# |
| Methods inherited from Atk4\Ui\Form\Control |
|---|
set(), renderTemplateToHtml(), onChange(), jsInput() |
| Methods inherited from Atk4\Ui\AbstractView |
|---|
getOwner() |
| Methods used from Atk4\Core\AppScopeTrait |
|---|
assertInstanceOfApp(), issetApp(), getApp(), setApp() |
| Methods used from Atk4\Core\ContainerTrait |
|---|
_uniqueElementName(), _addContainer(), removeElement(), _shorten(), getElement(), hasElement() |
| Methods used from Atk4\Core\InitializerTrait |
|---|
isInitialized(), assertIsInitialized(), invokeInit() |
| Methods used from Atk4\Core\StaticAddToTrait |
|---|
_addToAdd(), addTo(), addToWithCl(), addToWithClUnsafe() |
| Methods used from Atk4\Core\TrackableTrait |
|---|
issetOwner(), setOwner(), unsetOwner(), getDesiredName(), destroy() |
| Properties | |||
|---|---|---|---|
public
|
HtmlTemplate|null
|
$itemSelectorTemplate
|
# |
public
|
View|null
|
$itemSelector
|
# |
public
|
string
|
$loaderCssName = 'atk-tree-loader'
|
# |
public
|
bool
|
$allowMultiple = true
|
# |
public
|
array
|
$treeItems = []
|
# |
private
|
JsCallback|null
|
$cb
|
# |
| Properties inherited from Atk4\Ui\Form\Control |
|---|
$form, $entityField, $controlClass, $layoutWrap, $renderLabel, $width, $caption, $hint, $disabled, $readOnly |
| Properties inherited from Atk4\Ui\View |
|---|
$_jsActions, $model, $region, $ui, $class, $style, $attr, $template, $defaultTemplate, $content, $element, $executorFactory, $stickyArgs |
| Properties inherited from Atk4\Ui\AbstractView |
|---|
$_addLater, $_rendered, $elements |
| Properties used from Atk4\Core\AppScopeTrait |
|---|
$_app, $maxNameLength, $uniqueNameHashes |
| Properties used from Atk4\Core\ContainerTrait |
|---|
$_elementNameCounts |
| Properties used from Atk4\Core\InitializerTrait |
|---|
$_initialized |
| Properties used from Atk4\Core\NameTrait |
|---|
$name |
| Properties used from Atk4\Core\TrackableTrait |
|---|
$_owner, $shortName |