Свойство | Type | Description | |
---|---|---|---|
$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". |
Méthode | Description | |
---|---|---|
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. |
public renderEmpty ( ) : string | ||
Résultat | string | the rendering result |
abstract public renderItems ( ) : string | ||
Résultat | string | the rendering result. |
public renderPager ( ) : string | ||
Résultat | string | the rendering result |
public renderSorter ( ) : string | ||
Résultat | string | the rendering result |
public $dataProvider |
public $emptyText |
public $emptyTextOptions |
public $layout |
public $options |
public $pager |
public $showOnEmpty |
public $sorter |
public $summary |