I am having a problem trying to create a simple widget. Debugging it, I found that it crashes when requiring the file in YiiBase.
Strangely enough, if I convert the CWidget to a CPortlet it works fine. This would seem to indicate that probably not a permissions or file path issue.
Here is the code that creates the widget in my view:
public $action;
public function init()
{
}
protected function run()
{
$this->render('_taskBar', array('action'=>$this->action));
}
}
Here is the code that works just fine:
Yii::import(‘zii.widgets.CPortlet’);
class TaskBar extends CPortlet
{
public $action;
public function init()
{
parent::init();
}
protected function renderContent()
{
$this->render('_taskBar', array('action'=>$this->action));
}