Skip to content

Instantly share code, notes, and snippets.

@sorokadima
Created July 29, 2020 08:11
Show Gist options
  • Save sorokadima/8c4f5b356bf7322d43dcb80b6b32dd92 to your computer and use it in GitHub Desktop.
Save sorokadima/8c4f5b356bf7322d43dcb80b6b32dd92 to your computer and use it in GitHub Desktop.
Yii2 DataColumn render HTML
<?php
// ...
[
'class' => 'kartik\grid\DataColumn',
'attribute' => 'foo',
'format' => 'html', // <=====
'value' => function (Limit $model) {
return '-';
},
'label' => Yii::t('panel', Yii::t('panel', 'Foo')),
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment