PHP Интерфейс yii\data\DataProviderInterface
Data providers are components that sort and paginate data, and provide them to widgets
such as
GridView,
ListView.
For more details and usage information on DataProviderInterface, see the
guide article on data providers.
Показать файл
Открыть проект
Примеры использования интерфейса
Открытые методы
Описание методов
getCount()
публичный Метод
This is equivalent to count($provider->getModels()).
When [[getPagination|pagination]] is false, this is the same as [[getTotalCount|totalCount]].
getKeys()
публичный Метод
Returns the key values associated with the data models.
public getKeys ( ) : array |
Результат |
array |
the list of key values corresponding to [[getModels|models]]. Each data model in [[getModels|models]]
is uniquely identified by the corresponding key value in this array. |
getModels()
публичный Метод
Returns the data models in the current page.
getSort()
публичный Метод
public getSort ( ) : Sort |
Результат |
Sort |
the sorting object. If this is false, it means the sorting is disabled. |
getTotalCount()
публичный Метод
When [[getPagination|pagination]] is false, this is the same as [[getCount|count]].
prepare()
публичный Метод
public prepare ( boolean $forcePrepare = false ) |
$forcePrepare |
boolean |
whether to force data preparation even if it has been done before. |