PHP Класс kartik\tree\TreeViewInput

С версии: 1.0
Автор: Kartik Visweswaran ([email protected])
Наследование: extends TreeView
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$asDropdown whether to show the input as a dropdown select. If set to false, it will display directly the tree view selector widget. Defaults to true. The BootstrapPluginAsset will automatically be loaded if this is set to true. Defaults to true.
$attribute the model attribute that this widget is associated with.
$autoCloseOnSelect whether to autoclose the dropdown on input selection when asDropdown is true. Defaults to true.
$dropdownConfig the configuration of the tree view dropdown. The following configuration options are available: - input: array the HTML attributes for the dropdown input container which displays the selected tree items. The following special options are available: - placeholder: string, defaults to Select... - dropdown: array, the HTML attributes for the dropdown tree view menu. - options: array, the HTML attributes for the wrapper container - caret: string, the markup for rendering the dropdown indicator for up and down. Defaults to TreeViewInput::CARET.
$model the data model that this widget is associated with.
$name the input name. This must be set if [[model]] and [[attribute]] are not set.
$options the HTML attributes for the input that will store the selected nodes for the widget
$showToolbar whether to show the toolbar in the footer. Defaults to false.
$value the input value.

Открытые методы

Метод Описание
getInput ( ) : string Generates the hidden input for storage
registerInputAssets ( ) Registers assets for TreeViewInput
renderToolbar ( ) : string Renders the markup for the button actions toolbar
renderWidget ( )
run ( )

Защищенные методы

Метод Описание
hasModel ( ) : boolean
initDropdown ( ) Initialize tree dropdown menu settings and options
initTreeView ( )
renderDropdown ( string $content ) : string Generates the dropdown tree menu

Описание методов

getInput() публичный Метод

Generates the hidden input for storage
public getInput ( ) : string
Результат string

hasModel() защищенный Метод

protected hasModel ( ) : boolean
Результат boolean whether this widget is associated with a data model.

initDropdown() защищенный Метод

Initialize tree dropdown menu settings and options
protected initDropdown ( )

initTreeView() защищенный Метод

protected initTreeView ( )

registerInputAssets() публичный Метод

Registers assets for TreeViewInput
public registerInputAssets ( )

renderDropdown() защищенный Метод

Generates the dropdown tree menu
protected renderDropdown ( string $content ) : string
$content string the content to be embedded in the dropdown menu
Результат string

renderToolbar() публичный Метод

Renders the markup for the button actions toolbar
public renderToolbar ( ) : string
Результат string

renderWidget() публичный Метод

public renderWidget ( )

run() публичный Метод

public run ( )

Описание свойств

$asDropdown публичное свойство

whether to show the input as a dropdown select. If set to false, it will display directly the tree view selector widget. Defaults to true. The BootstrapPluginAsset will automatically be loaded if this is set to true. Defaults to true.
public $asDropdown

$attribute публичное свойство

the model attribute that this widget is associated with.
public $attribute

$autoCloseOnSelect публичное свойство

whether to autoclose the dropdown on input selection when asDropdown is true. Defaults to true.
public $autoCloseOnSelect

$dropdownConfig публичное свойство

the configuration of the tree view dropdown. The following configuration options are available: - input: array the HTML attributes for the dropdown input container which displays the selected tree items. The following special options are available: - placeholder: string, defaults to Select... - dropdown: array, the HTML attributes for the dropdown tree view menu. - options: array, the HTML attributes for the wrapper container - caret: string, the markup for rendering the dropdown indicator for up and down. Defaults to TreeViewInput::CARET.
public $dropdownConfig

$model публичное свойство

the data model that this widget is associated with.
public $model

$name публичное свойство

the input name. This must be set if [[model]] and [[attribute]] are not set.
public $name

$options публичное свойство

the HTML attributes for the input that will store the selected nodes for the widget
public $options

$showToolbar публичное свойство

whether to show the toolbar in the footer. Defaults to false.
public $showToolbar

$value публичное свойство

the input value.
public $value