An ID that uniquely identifies the data provider among all data providers. Generated automatically the following way in case it is not set:
A Promise which resolves when this Component has been successfully initialized.
Model Class which can be used for resolving Attribute Labels, Hints etc.
Promise which resolves to the number matching records for the current query.
Number of data providers on the current page. Used to generate unique IDs.
Returns the number of data models in the current page.
the number of data models in the current page.
Returns the key values associated with the data models.
the list of key values corresponding to [[models]]. Each data model in [[models]] is uniquely identified by the corresponding key value in this array.
Returns the data models in the current page.
the list of data models in the current page.
Returns the pagination object used by this data provider. Note that you should call prepare or getModels first to get correct values of Pagination.totalCount and [[Pagination::pageCount]].
the pagination object. If this is false, it means the pagination is disabled.
Returns the sorting object used by this data provider.
the sorting object. If this is false, it means the sorting is disabled.
Returns the total number of data models. When pagination is false, this returns the same value as count. Otherwise, it will call prepareTotalCount to get the count.
total number of possible data models.
Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration.
Prepares the data models and keys.
whether to force data preparation even if it has been done before.
Prepares the keys associated with the currently available data models.
the available data models
the keys
Prepares the data models that will be made available in the current page.
the available data models
Returns a value indicating the total number of data models in this data provider.
total number of data models in this data provider.
Refreshes the data provider. After calling this method, if getModels, getKeys or getTotalCount is called again, they will re-execute the query and return the latest data available.
Sets the data models in the current page.
the models in the current page
Sets the pagination for this data provider.
the pagination to be used by this data provider. This can be one of the following:
Sets the sort definition for this data provider.
the sort definition to be used by this data provider. This can be one of the following:
Sets the total number of data models.
the total number of data models.
Generated using TypeDoc
BaseDataProvider provides a base class for ActiveDataProvider and ArrayDataProvider
For more details and usage information on BaseDataProvider, see the guide article on data providers.
int $count The number of data models in the current page. This property is read-only.
array $keys The list of key values corresponding to [[models]]. Each data model in [[models]] is uniquely identified by the corresponding key value in this array.
array $models The list of data models in the current page.
Pagination|false $pagination The pagination object. If this is false, it means the pagination is disabled. Note that the type of this property differs in getter and setter. See [[getPagination()]] and [[setPagination()]] for details.
Sort|bool $sort The sorting object. If this is false, it means the sorting is disabled. Note that the type of this property differs in getter and setter. See [[getSort()]] and [[setSort()]] for details.
int $totalCount Total number of possible data models.
Mahesh S Warrier https://github.com/codespede