Свойство | Тип | Описание | |
---|---|---|---|
$itemOptions | the HTML attributes for the container of the rendering result of each data model. This can be either an array specifying the common HTML attributes for rendering each data item, or an anonymous function that returns an array of the HTML attributes. The anonymous function will be called once for every data model returned by [[dataProvider]]. The "tag" element specifies the tag name of the container element and defaults to "div". If "tag" is false, it means no container element will be rendered. If this property is specified as an anonymous function, it should have the following signature: php function ($model, $key, $index, $widget) | ||
$itemView | the name of the view for rendering each data item, or a callback (e.g. an anonymous function) for rendering each data item. If it specifies a view name, the following variables will be available in the view: - $model: mixed, the data model - $key: mixed, the key value associated with the data item - $index: integer, the zero-based index of the data item in the items array returned by [[dataProvider]]. - $widget: ListView, this widget instance Note that the view name is resolved into the view file by the current context of the [[view]] object. If this property is specified as a callback, it should have the following signature: php function ($model, $key, $index, $widget) | ||
$options | the HTML attributes for the container tag of the list view. The "tag" element specifies the tag name of the container element and defaults to "div". | ||
$separator | the HTML code to be displayed between any two consecutive items. | ||
$viewParams | additional parameters to be passed to [[itemView]] when it is being rendered. This property is used only when [[itemView]] is a string representing a view name. |
Метод | Описание | |
---|---|---|
renderItem ( mixed $model, mixed $key, integer $index ) : string | Renders a single data model. | |
renderItems ( ) : string | Renders all data models. |
public renderItem ( mixed $model, mixed $key, integer $index ) : string | ||
$model | mixed | the data model to be rendered |
$key | mixed | the key value associated with the data model |
$index | integer | the zero-based index of the data model in the model array returned by [[dataProvider]]. |
Результат | string | the rendering result |
public renderItems ( ) : string | ||
Результат | string | the rendering result |
public $itemOptions |
public $itemView |
public $options |
public $separator |