PHP Class yiister\grid\widgets\MultifieldColumn

Inheritance: extends yii\grid\DataColumn
Exibir arquivo Open project: yiister/yii2-advanced-grid

Public Properties

Property Type Description
$attributes the secondary attribute names array
$template the string output template or the render callable The string allows all attribute names from $attributes array and from $attribute string placed between { and } Example: 'template' => '{name}
{slug}', The callable gets two parameters ($model and $column) and has to return output string. Example: 'template' => function ($model, $column) { $attributeValues = []; foreach ($column->attributes as $attribute) { $attributeValues[] = $model->{$attribute}; } return $model->{$column->attribute} . Html::tag('small', implode('
', $attributeValues)); },

Public Methods

Method Description
init ( )

Protected Methods

Method Description
renderDataCellContent ( $model, $key, $index )

Method Details

init() public method

public init ( )

renderDataCellContent() protected method

protected renderDataCellContent ( $model, $key, $index )

Property Details

$attributes public_oe property

the secondary attribute names array
public $attributes

$template public_oe property

the string output template or the render callable The string allows all attribute names from $attributes array and from $attribute string placed between { and } Example: 'template' => '{name}
{slug}', The callable gets two parameters ($model and $column) and has to return output string. Example: 'template' => function ($model, $column) { $attributeValues = []; foreach ($column->attributes as $attribute) { $attributeValues[] = $model->{$attribute}; } return $model->{$column->attribute} . Html::tag('small', implode('
', $attributeValues)); },
public $template