Yii::import('zii.widgets.CPortlet'); class UserMenu extends CPortlet { public function init() { $this->title=CHtml::encode(Yii::app()->user->name); parent::init(); } protected function renderContent() { $this->render('userMenu'); } }Yii::import('zii.widgets.CPortlet'); class UserMenu extends CPortlet { public function init() { $this->title=CHtml::encode(Yii::app()->user->name); parent::init(); } protected function renderContent() { $this->render('userMenu'); } }
Fatal error: Class 'UserMenu' not found in /home/abc/public_html/framework/web/CWidgetFactory.php on line 148
Nobody? Wow. I got the same thing. Somebody must know how to fix it. We’re trying to do the blog tutorial. I just block copied these portlet lessons and this was the result.
public function init()
{
$this->title=CHtml::encode(Yii::app()->user->name);
parent::init();
}
protected function renderContent()
{
$this->render('userMenu');
}