title: How to transmit $data to function with gridview
body: <p>I have model <code>DangTuyen</code> and function</p>
  
  <pre><code>public function statusImageAccept($status) {
          $str = "";
  
          if($status == 0)
              $str = Yii::app()-&gt;request-&gt;baseUrl .  '/images/layout/dangTuyen/tick_icon_OK_black.png'.$status;
          else
              $str = Yii::app()-&gt;request-&gt;baseUrl . '/images/layout/dangTuyen/tick_icon_green.png'.$status;
  
          $arr = array(
              'label' =&gt; 'Accept',
              'imageUrl' =&gt; $str,
              'htmlOption' =&gt; array('class' =&gt; 'imageIcon'),
              'click' =&gt; 'function(){}',
          );
  
          return $arr;
      }
  </code></pre>
  
  <p>I use gridview:</p>
  
  <pre><code>Controller::widget('zii.widgets.grid.CGridView', array(
  
      'id' =&gt; 'dang-tuyen-grid',
      'dataProvider' =&gt; $model-&gt;search(),
      'filter' =&gt; $model,
      'columns' =&gt; array(
                   'accept' =&gt; $model-&gt;statusImageAccept('$data-&gt;status'),
  ));
  </code></pre>
  
  <p>When use <code>$model-&gt;statusImageAccept('$data-&gt;status')</code> then in function <code>statusImageAccept($status)</code>, var $status is string <code>$data-&gt;status</code></p>
  
  <p>How to use <code>$data</code>?</p>