renderAttribute() protected method

Renders a single attribute.
protected renderAttribute ( array $attribute, integer $index ) : string
$attribute array the specification of the attribute to be rendered.
$index integer the zero-based index of the attribute in the [[attributes]] array
return string the rendering result
Ejemplo n.º 1
0
 /**
  * @inheritdoc
  */
 protected function renderAttribute($attribute, $index)
 {
     if ($attribute['value'] instanceof Closure) {
         $attribute['value'] = call_user_func($attribute['value'], $this->model, $index);
     }
     return parent::renderAttribute($attribute, $index);
 }