title: Class 'CHtml' not found in Gridview in Yii2
body: <p>I am developing Yii2 application where I want to list orders data in GridView.</p>
  
  <p>User can click on order id and will be redirected to another GridView with order details listing. I want to display link with order id to redirect to order details page.</p>
  
  <p>But I got the following error:</p>
  
  <blockquote>
    <p>Class 'CHtml' not found</p>
  </blockquote>
  
  <p>in GridView. Here is my code:</p>
  
  <pre><code>&lt;?= GridView::widget([
      'dataProvider' =&gt; $dataProvider,
      'filterModel' =&gt; $searchModel,
      'columns' =&gt; [
           ['class' =&gt; 'yii\grid\SerialColumn'],
           [
               'attribute'  =&gt; 'id',
               'value' =&gt; CHtml::link("Link", Yii::app()-&gt;createUrl("user/view")),
               'format'  =&gt; 'raw',
           ],
           'user_id',
           'amount',
           'promo_code_used',   
           ['class' =&gt; 'yii\grid\ActionColumn'],
      ],
  ]) ?&gt;
  </code></pre>