For this, I initialize the model, filling an session variable into the model attributes in oder to render an view.
The view is located insight the widget folder under views/_part_SearchForm.php.
My widget-code lookes like that:
class SearchFormWidget extends CWidget
{
public function init()
{
//
}
public function run()
{
$model = new SearchSets(); //init model
$model->setAttributes(Yii::app()->user->solrSet); //fill attributes from session variable
$this->render('_part_SearchForm', array('model'=>$model)); //render the
}
}
Running this code, i get an CException: SearchFormWidget and Behavior does not have an scope "getModule".
What’s happend here and is there a way to solve that problem in order to use models insight an widget?