Could not find that in documentation and around google as well.
I render table's widget like this:
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'last_name',
'available',
['class' => 'yii\grid\ActionColumn'],
],
And that renders a table like this:
...
<tr>
<td>Some last name</td>
<td>1</td>
</tr>
..
As you might already guess, available
represents a boolean. It can be either 0 or 1. But I don't want to display it like this. I want 1 to become 'Yes' and 0 to become 'No'.
So how would I do str_replace(array('1', '0'), array('Yes', 'No'))
on that column??