PHP Class unclead\multipleinput\renderers\BaseRenderer

Inheritance: extends yii\base\Object, implements unclead\multipleinput\renderers\RendererInterface
Afficher le fichier Open project: unclead/yii2-multiple-input

Méthodes publiques

Свойство Type Description
$addButtonOptions the HTML options for the add button
$addButtonPosition position of add button. By default button is rendered in the row.
$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 string
$columns array of columns
$data input data
$form the instance of ActiveForm class.
$id the ID of the widget
$max maximum number of rows
$min minimum number of rows.
$removeButtonOptions the HTML options for the remove button
$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 widget object

Protected Properties

Свойство Type Description
$context unclead\multipleinput\TabularInput | unclead\multipleinput\MultipleInput

Méthodes publiques

Méthode Description
getIndexPlaceholder ( ) : mixed
init ( )
render ( )
setContext ( $context )

Méthodes protégées

Méthode Description
initColumns ( ) Creates column objects and initializes them.
internalRender ( ) : mixed
isAddButtonPositionFooter ( ) : boolean
isAddButtonPositionHeader ( ) : boolean
isAddButtonPositionRow ( ) : boolean
prepareJsAttributes ( ) : array Prepares attributes options for client side.
prepareTemplate ( ) : string
registerAssets ( ) Register script.

Private Methods

Méthode Description
prepareButtons ( )
prepareColumnClass ( )
prepareIndexPlaceholder ( )
prepareMaxOption ( )
prepareMinOption ( )

Method Details

getIndexPlaceholder() public méthode

public getIndexPlaceholder ( ) : mixed
Résultat mixed

init() public méthode

public init ( )

initColumns() protected méthode

Creates column objects and initializes them.
protected initColumns ( )

internalRender() abstract protected méthode

abstract protected internalRender ( ) : mixed
Résultat mixed

isAddButtonPositionFooter() protected méthode

protected isAddButtonPositionFooter ( ) : boolean
Résultat boolean

isAddButtonPositionHeader() protected méthode

protected isAddButtonPositionHeader ( ) : boolean
Résultat boolean

isAddButtonPositionRow() protected méthode

protected isAddButtonPositionRow ( ) : boolean
Résultat boolean

prepareJsAttributes() protected méthode

Prepares attributes options for client side.
protected prepareJsAttributes ( ) : array
Résultat array

prepareTemplate() abstract protected méthode

abstract protected prepareTemplate ( ) : string
Résultat string

registerAssets() protected méthode

Register script.
protected registerAssets ( )

render() public méthode

public render ( )

setContext() public méthode

public setContext ( $context )

Property Details

$addButtonOptions public_oe property

the HTML options for the add button
public $addButtonOptions

$addButtonPosition public_oe property

position of add button. By default button is rendered in the row.
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

public string $columnClass
Résultat string

$columns public_oe property

array of columns
public $columns

$context protected_oe property

protected TabularInput,unclead\multipleinput|MultipleInput,unclead\multipleinput $context
Résultat unclead\multipleinput\TabularInput | unclead\multipleinput\MultipleInput

$data public_oe property

input data
public $data

$form public_oe property

the instance of ActiveForm class.
public $form

$id public_oe property

the ID of the widget
public $id

$max public_oe property

maximum number of rows
public $max

$min public_oe property

minimum number of rows.
Since: 1.2.6 Use this option with value 0 instead of `allowEmptyList` with `true` value
public $min

$removeButtonOptions public_oe property

the HTML options for the remove button
public $removeButtonOptions

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