PHP Класс unclead\multipleinput\MultipleInput

Автор: Eugene Tupikov ([email protected])
Наследование: extends yii\widgets\InputWidget
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$addButtonOptions the HTML options for the add button
$addButtonPosition position of add button.
$allowEmptyList whether to allow the empty list
$attributeOptions client-side attribute options, e.g. enableAjaxValidation. You may use this property in case when you use widget without a model, since in this case widget is not able to detect client-side options automatically.
$columnClass the name of column class. You can specify your own class to extend base functionality. Defaults to unclead\multipleinput\MultipleInputColumn
$columns columns configuration
$data input data
$enableGuessTitle whether to guess column title in case if there is no definition of columns
$form an instance of ActiveForm which you have to pass in case of using client validation
$isEmbedded whether the widget is embedded or not.
$max maximum number of rows
$min minimum number of rows
$removeButtonOptions the HTML options for the remove button
$rendererClass the name of renderer class. Defaults to unclead\multipleinput\renderers\TableRenderer.
$rowOptions the HTML attributes for the table body rows. This can be either an array specifying the common HTML attributes for all body rows, or an anonymous function that returns an array of the HTML attributes. It should have the following signature: php function ($model, $index, $context) - $model: the current data model being rendered - $index: the zero-based index of the data model in the model array - $context: the MultipleInput widget object

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

Метод Описание
init ( ) Initialization.
run ( ) Run widget.

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

Метод Описание
guessColumns ( ) This function tries to guess the columns to show from the given data if [[columns]] are not explicitly specified.
initData ( ) Initializes data.

Приватные методы

Метод Описание
createRenderer ( ) : TableRenderer

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

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

This function tries to guess the columns to show from the given data if [[columns]] are not explicitly specified.
protected guessColumns ( )

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

Initialization.
public init ( )

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

Initializes data.
protected initData ( )

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

Run widget.
public run ( )

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

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

the HTML options for the add button
public $addButtonOptions

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

position of add button.
public $addButtonPosition

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

whether to allow the empty list
public $allowEmptyList

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

client-side attribute options, e.g. enableAjaxValidation. You may use this property in case when you use widget without a model, since in this case widget is not able to detect client-side options automatically.
public $attributeOptions

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

the name of column class. You can specify your own class to extend base functionality. Defaults to unclead\multipleinput\MultipleInputColumn
public $columnClass

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

columns configuration
public $columns

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

input data
public $data

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

whether to guess column title in case if there is no definition of columns
public $enableGuessTitle

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

an instance of ActiveForm which you have to pass in case of using client validation
С версии: 2.1
public $form

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

whether the widget is embedded or not.
public $isEmbedded

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

maximum number of rows
public $max

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

minimum number of rows
public $min

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

the HTML options for the remove button
public $removeButtonOptions

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

the name of renderer class. Defaults to unclead\multipleinput\renderers\TableRenderer.
С версии: 1.4
public $rendererClass

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

the HTML attributes for the table body rows. This can be either an array specifying the common HTML attributes for all body rows, or an anonymous function that returns an array of the HTML attributes. It should have the following signature: php function ($model, $index, $context) - $model: the current data model being rendered - $index: the zero-based index of the data model in the model array - $context: the MultipleInput widget object
public $rowOptions