title: Add checkbox in Yii2 GridView filtering
body: <p>I'm using Yii2 and I want to add a checkbox filter for a boolean variables in a <code>GridView</code> search. This is my rules from <code>ModelSearch</code>:</p>
  
  <pre><code>public function rules()
  {
       return [
           [['bool1','bool2','bool3','bool4'],'boolean']
       ];
  }
  </code></pre>
  
  <p>So, how can I render as a checkbox instead of text input?</p>
  
  <p>These are my <code>GridView</code> parameters: </p>
  
  <pre><code>$paramsCustom = [
          'dataProvider' =&gt; $dataProvider,
          'filterModel' =&gt; $searchModel,
          'columns' =&gt; [
              ['class' =&gt; 'yii\grid\SerialColumn'],
              ['class' =&gt; 'yii\grid\CheckboxColumn'],
              [ 
                  //boolean column
                  'attribute' =&gt; 'bool1',
                  'label' =&gt; 'S',
                  'format' =&gt; 'raw',
                  'value' =&gt; function ($model, $index, $widget) {
                       ....           
                  },
              ],
  </code></pre>
  
  <p>My <code>bool1</code> attribute is boolean. So, in the <code>GridView</code> filtering appears a text input, and I want to filter the results displayed in the <code>GridView</code> using a checkbox instead a text input.</p>
  
  <p>This is my <code>GridView</code> column:</p>
  
  <p><a href="https://i.stack.imgur.com/u0sMX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u0sMX.png" alt="This is my GridView column"></a></p>