yii\grid\Column::renderDataCell PHP Method

renderDataCell() public method

Renders a data cell.
public renderDataCell ( mixed $model, mixed $key, integer $index ) : string
$model mixed the data model being rendered
$key mixed the key associated with the data model
$index integer the zero-based index of the data item among the item array returned by [[GridView::dataProvider]].
return string the rendering result
    public function renderDataCell($model, $key, $index)
    {
        if ($this->contentOptions instanceof Closure) {
            $options = call_user_func($this->contentOptions, $model, $key, $index, $this);
        } else {
            $options = $this->contentOptions;
        }
        return Html::tag('td', $this->renderDataCellContent($model, $key, $index), $options);
    }