PHP 클래스 yii\widgets\ListView

For more details and usage information on ListView, see the guide article on data widgets.
부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends BaseListView
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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.

메소드 상세

renderItem() 공개 메소드

Renders a single data model.
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

renderItems() 공개 메소드

Renders all data models.
public renderItems ( ) : string
리턴 string the rendering result

프로퍼티 상세

$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)
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $itemOptions

$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)
public $itemView

$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".
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $options

$separator 공개적으로 프로퍼티

the HTML code to be displayed between any two consecutive items.
public $separator

$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.
public $viewParams