I can’t seem to get variables passed from a widget class to its view classes. I get the error:
Undefined variable: test
Here is the run function in the widget:
public function run()
{
$test='testdata';
$this->render('application.extensions.widgets.Favorites.views._userview', array($this->dataProvider), array('test'=>$test));
}
This is div in the view:
<div id="test">
<?php echo $test; ?>
</div>
What is the problem?
Thanks,
Alex