Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- 'label' => 'Status',
- 'attribute' => 'activeStatus',
- 'format' => 'html',
- 'value'=>function ($data){return $data->activeStatus ? '<span class="label label-success">Active</span>' : '<span class="label label-danger">Inactive</span>';}
- ],
- [
- 'label' => 'Status',
- 'attribute' => 'activeStatus',
- 'format' => 'html',
- 'value' => function ($data){
- return $data->activeStatus ? '<span class="label label-success">Active</span>' : '<span class="label label-danger">Inactive</span>';
- },
- 'filter' => [1 => 'Active', 0 => 'Inactive'],
- ],
- public function rules()
- {
- return [
- [['activeStatus'], 'integer'],
- .
- .
- .
- ];
- }
- // grid filtering conditions
- $query->andFilterWhere([
- 'activeStatus' => $this->activeStatus,
- ]);
Add Comment
Please, Sign In to add comment