helpers\BaseHtml getAttributeValue()

getAttributeValue() public static method

Returns the value of the specified attribute name or expression.

For an attribute expression like [0]dates[0], this method will return the value of $model->dates[0]. See getAttributeName() for more details about attribute expression.

If an attribute value is an instance of yii\db\ActiveRecordInterface or an array of such instances, the primary value(s) of the AR instance(s) will be returned instead.

public static string|array getAttributeValue ( $model, $attribute )
$model yii\base\Model

The model object

$attribute string

The attribute name or expression

return string|array

The corresponding attribute value

throws yii\base\InvalidParamException

if the attribute name contains non-word characters.

doc_Yii
2016-10-30 17:05:07
Comments
Leave a Comment

Please login to continue.