Property | Type | Description | |
---|---|---|---|
$tableOptions | the HTML attributes for the variation table element. | ||
$variationAttribute | name of the variation model attribute. If not set [[attribute]] value will be used. | ||
$variationLabel | variation label source. This should be either a string - variation option model attribute, which value should be used as variation label, or a callback of following signature: php function ($mainModel, $variationModel) { return string label } | ||
$variationName | model variation behavior name, which should be used by this column. It should refer to [[\yii2tech\ar\variation\VariationBehavior]] instance. If not set - model itself will be used for the method invocations. |
Method | Description | |
---|---|---|
getVariationBehavior ( |
Gets the variation behavior from model. | |
getVariationLabel ( |
Returns the variation label. | |
getVariationLabels ( |
Returns all available variation labels. | |
getVariationValue ( |
Returns the variation value. | |
renderDataCellContent ( $model, $key, $index ) |
protected getVariationBehavior ( |
||
$model | model instance. | |
return | yii2tech\ar\variation\VariationBehavior | variation behavior instance. |
protected getVariationLabel ( |
||
$mainModel | main model instance. | |
$variationModel | variation model instance. | |
return | string | label. |
protected getVariationLabels ( |
||
$mainModel | main model instance. | |
$labelAttribute | string | name of the attribute, which is used as label source. |
return | array | list labels in format: optionPk => label |
protected getVariationValue ( |
||
$variationModel | variation model instance. | |
return | string | value. |
public $tableOptions |
public $variationAttribute |
public $variationLabel |