PHP Class unclead\multipleinput\TabularInput

Inheritance: extends yii\bootstrap\Widget
ファイルを表示 Open project: unclead/yii2-multiple-input Class Usage Examples

Public Properties

Property Type Description
$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\TabularColumn
$columns array
$form an instance of ActiveForm which you have to pass in case of using client validation
$max maximum number of rows
$min minimum number of rows
$models yii\base\Model[] | yii\db\ActiveRecordInterface[]
$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 TabularInput widget object

Public Methods

Method Description
init ( ) Initialization.
run ( ) Run widget.

Private Methods

Method Description
createRenderer ( ) : TableRenderer

Method Details

init() public method

Initialization.
public init ( )

run() public method

Run widget.
public run ( )

Property Details

$addButtonOptions public_oe property

the HTML options for the add button
public $addButtonOptions

$addButtonPosition public_oe property

position of add button.
public $addButtonPosition

$allowEmptyList public_oe property

whether to allow the empty list
public $allowEmptyList

$attributeOptions public_oe property

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 public_oe property

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

$columns public_oe property

public array $columns
return array

$form public_oe property

an instance of ActiveForm which you have to pass in case of using client validation
Since: 2.1
public $form

$max public_oe property

maximum number of rows
public $max

$min public_oe property

minimum number of rows
public $min

$models public_oe property

public Model[],yii\base|ActiveRecordInterface[],yii\db $models
return yii\base\Model[] | yii\db\ActiveRecordInterface[]

$removeButtonOptions public_oe property

the HTML options for the remove button
public $removeButtonOptions

$rendererClass public_oe property

the name of renderer class. Defaults to unclead\multipleinput\renderers\TableRenderer.
Since: 1.4
public $rendererClass

$rowOptions public_oe property

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 TabularInput widget object
public $rowOptions