[Yii Framework] 创建widget

class MyWidget extends CWidget
{
public function init()
{
// this method is called by CController::beginWidget()
}
public function run()
{
// this method is called by CController::endWidget()
}
}
通常,widget的视图是是放在components/views里面的,通过CWidget::render()来传递参数的

posted @ 2010-04-21 11:51 DavidHHuan 阅读(...) 评论(...) 编辑 收藏