title: pass array to $this->beginWidget use in Header from controller?
body: <p><strong>I am using Widget  in my Header layout.</strong></p>
  
  <p>In My controller .I have set following variables:</p>
  
  <pre><code>public $testVal="testing";
  </code></pre>
  
  <p>I have created a widget in YII and I use it in <strong>my Header layout</strong>:</p>
  
  <pre><code>&lt;?php  $this-&gt;beginWidget('CountryWithCityWidget'); $this-&gt;endWidget();?&gt;  
  </code></pre>
  
  <p>My widget Code is:</p>
  
  <pre><code>&lt;?php
  class CountryWithCityWidget extends CWidget
  {
  public $countryList;
  public $cityList;
  
   public function init()
  {
  
      print_r($testVal);// I need $testVal testing here from view ***How ????***
      echo "==============================";
      die;
  
  
      parent::init();
  }
  
  public function run()
  {
       $this-&gt;render('countryWithCityWidget',array('countryList' =&gt; $this-&gt;countryList,'locationDetailList'=&gt;$this-&gt;cityList));
  }
  }
  ?&gt;
  </code></pre>
  
  <p>In view I will get it like  <code>$this-&gt;testVal</code>  and then from view I want to send $testVal to widget where I am using it.</p>
  
  <p>How can I do that?</p>