contentOptions instanceof Closure) { $options = call_user_func($this->contentOptions, $model, $key, $index, $this); } else { $options = $this->contentOptions; } $icon = Html::a($this->renderDataCellContent($model, $key, $index), '#', [ 'class' => 'checkbox-button', 'data' => [ 'action' => Url::toRoute([$this->attribute, 'id' => $key]), ], 'onclick' => 'return false;' ]); Html::addCssStyle($options, 'text-align:center;'); return Html::tag('td', $icon, $options); } }