PHP 클래스 yii\widgets\BaseListView

It provides features like sorting, paging and also filtering the data. For more details and usage information on BaseListView, see the guide article on data widgets.
부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends yii\base\Widget
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$dataProvider the data provider for the view. This property is required.
$emptyText the HTML content to be displayed when [[dataProvider]] does not have any data.
$emptyTextOptions the HTML attributes for the emptyText of the list view. The "tag" element specifies the tag name of the emptyText element and defaults to "div".
$layout the layout that determines how different sections of the list view should be organized. The following tokens will be replaced with the corresponding section contents: - {summary}: the summary section. See BaseListView::renderSummary. - {items}: the list items. See BaseListView::renderItems. - {sorter}: the sorter. See BaseListView::renderSorter. - {pager}: the pager. See BaseListView::renderPager.
$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".
$pager the configuration for the pager widget. By default, LinkPager will be used to render the pager. You can use a different widget class by configuring the "class" element. Note that the widget must support the pagination property which will be populated with the [[\yii\data\BaseDataProvider::pagination|pagination]] value of the [[dataProvider]].
$showOnEmpty whether to show the list view if [[dataProvider]] returns no data.
$sorter the configuration for the sorter widget. By default, LinkSorter will be used to render the sorter. You can use a different widget class by configuring the "class" element. Note that the widget must support the sort property which will be populated with the [[\yii\data\BaseDataProvider::sort|sort]] value of the [[dataProvider]].
$summary the HTML content to be displayed as the summary of the list view. If you do not want to show the summary, you may set it with an empty string. The following tokens will be replaced with the corresponding values: - {begin}: the starting row number (1-based) currently being displayed - {end}: the ending row number (1-based) currently being displayed - {count}: the number of rows currently being displayed - {totalCount}: the total number of rows available - {page}: the page number (1-based) current being displayed - {pageCount}: the number of pages available
$summaryOptions the HTML attributes for the summary of the list view. The "tag" element specifies the tag name of the summary element and defaults to "div".

공개 메소드들

메소드 설명
init ( ) Initializes the view.
renderEmpty ( ) : string Renders the HTML content indicating that the list view has no data.
renderItems ( ) : string Renders the data models.
renderPager ( ) : string Renders the pager.
renderSection ( string $name ) : string | boolean Renders a section of the specified name.
renderSorter ( ) : string Renders the sorter.
renderSummary ( ) Renders the summary text.
run ( ) Runs the widget.

메소드 상세

init() 공개 메소드

Initializes the view.
public init ( )

renderEmpty() 공개 메소드

Renders the HTML content indicating that the list view has no data.
또한 보기: emptyText
public renderEmpty ( ) : string
리턴 string the rendering result

renderItems() 추상적인 공개 메소드

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

renderPager() 공개 메소드

Renders the pager.
public renderPager ( ) : string
리턴 string the rendering result

renderSection() 공개 메소드

If the named section is not supported, false will be returned.
public renderSection ( string $name ) : string | boolean
$name string the section name, e.g., `{summary}`, `{items}`.
리턴 string | boolean the rendering result of the section, or false if the named section is not supported.

renderSorter() 공개 메소드

Renders the sorter.
public renderSorter ( ) : string
리턴 string the rendering result

renderSummary() 공개 메소드

Renders the summary text.
public renderSummary ( )

run() 공개 메소드

Runs the widget.
public run ( )

프로퍼티 상세

$dataProvider 공개적으로 프로퍼티

the data provider for the view. This property is required.
public $dataProvider

$emptyText 공개적으로 프로퍼티

the HTML content to be displayed when [[dataProvider]] does not have any data.
public $emptyText

$emptyTextOptions 공개적으로 프로퍼티

the HTML attributes for the emptyText of the list view. The "tag" element specifies the tag name of the emptyText element and defaults to "div".
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $emptyTextOptions

$layout 공개적으로 프로퍼티

the layout that determines how different sections of the list view should be organized. The following tokens will be replaced with the corresponding section contents: - {summary}: the summary section. See BaseListView::renderSummary. - {items}: the list items. See BaseListView::renderItems. - {sorter}: the sorter. See BaseListView::renderSorter. - {pager}: the pager. See BaseListView::renderPager.
public $layout

$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

$pager 공개적으로 프로퍼티

the configuration for the pager widget. By default, LinkPager will be used to render the pager. You can use a different widget class by configuring the "class" element. Note that the widget must support the pagination property which will be populated with the [[\yii\data\BaseDataProvider::pagination|pagination]] value of the [[dataProvider]].
public $pager

$showOnEmpty 공개적으로 프로퍼티

whether to show the list view if [[dataProvider]] returns no data.
public $showOnEmpty

$sorter 공개적으로 프로퍼티

the configuration for the sorter widget. By default, LinkSorter will be used to render the sorter. You can use a different widget class by configuring the "class" element. Note that the widget must support the sort property which will be populated with the [[\yii\data\BaseDataProvider::sort|sort]] value of the [[dataProvider]].
public $sorter

$summary 공개적으로 프로퍼티

the HTML content to be displayed as the summary of the list view. If you do not want to show the summary, you may set it with an empty string. The following tokens will be replaced with the corresponding values: - {begin}: the starting row number (1-based) currently being displayed - {end}: the ending row number (1-based) currently being displayed - {count}: the number of rows currently being displayed - {totalCount}: the total number of rows available - {page}: the page number (1-based) current being displayed - {pageCount}: the number of pages available
public $summary

$summaryOptions 공개적으로 프로퍼티

the HTML attributes for the summary of the list view. The "tag" element specifies the tag name of the summary element and defaults to "div".
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $summaryOptions