在CListView中为什么没有申明$data,就直接用$data->id了呢 [ 新手入门 ]
请教下各位,在CListView
中,为什么没有申明$data
,就直接用$data->id
了呢?在控制器中我也找了只有$dataProvider
,$data
是怎么出现的呢?
共 3 条回复
-
有几个变量是CListView内部声明的:
$this: refers to the owner of this list view widget. For example, if the widget is in the view of a controller, then $this refers to the controller.
$data: refers to the data item currently being rendered.
$index: refers to the zero-based index of the data item currently being rendered.
$widget: refers to this list view widget instance.
flyingoneshjs 上海
注册时间:2012-02-10
最后登录:2024-10-09
在线时长:0小时59分
最后登录:2024-10-09
在线时长:0小时59分
- 粉丝1
- 金钱390
- 威望0
- 积分390