flyingoneshjs 2012-03-07 13:52:38 3337次浏览 3条回复 0 0 0

请教下各位,在CListView中,为什么没有申明$data,就直接用$data->id了呢?在控制器中我也找了只有$dataProvider$data是怎么出现的呢?

  • 回复于 2012-03-13 13:42 举报

    有几个变量是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.

  • 回复于 2012-03-14 15:34 举报

    不错。收藏了。

  • 回复于 2012-05-21 14:17 举报

    2L很强大,收藏了!

您需要登录后才可以回复。登录 | 立即注册