title: Use a widget in a statically-called method
body: <p>Normally a widget is used by calling <code>CController::widget()</code> on an instance of <code>CController</code>, typically <code>$this</code> in a view.</p>
  
  <p>But if I'm writing a static method, a helper, say, then I don't have access to an instance of <code>CController</code>. So how do I use a widget?</p>
  
  <p>Let's say further that this helper method is invoked in the <code>eval()</code>’ed expression in a <code>CDataColumn</code>'s <code>value</code> property. That poor expression has almost no context at all. How should the helper use a widget?</p>
  
  <hr>
  
  <h2>EDIT: Code example</h2>
  
  <p>As requested, a view example:</p>
  
  <pre><code>$this-&gt;widget('zii.widgets.grid.CGridView', array(
      'dataProvider' =&gt; $model-&gt;search(),
      'columns' =&gt; array(
          array(
              'name' =&gt; 'attrName',
              'value' =&gt; '--USE WIDGET HERE--',
          ),
      )
  ));
  </code></pre>