data\BaseDataProvider setSort()

setSort() public method Sets the sort definition for this data provider. public void setSort ( $value )$value array|yii\data\Sort|boolean The sort definition to be used by this data provider. This can be one of the following: a configuration array for creating the sort definition object. The "class" element defaults to 'yii\data\Sort' an instance of yii\data\Sort or its subclass false, if sorting needs to be disabled. throws yii\base\InvalidParamException

data\BaseDataProvider setPagination()

setPagination() public method Sets the pagination for this data provider. public void setPagination ( $value )$value array|yii\data\Pagination|boolean The pagination to be used by this data provider. This can be one of the following: a configuration array for creating the pagination object. The "class" element defaults to 'yii\data\Pagination' an instance of yii\data\Pagination or its subclass false, if pagination needs to be disabled. throws yii\base\InvalidParamException

data\BaseDataProvider setTotalCount()

setTotalCount() public method Sets the total number of data models. public void setTotalCount ( $value )$value integer The total number of data models.

data\BaseDataProvider setModels()

setModels() public method Sets the data models in the current page. public void setModels ( $models )$models array The models in the current page

data\BaseDataProvider prepareModels()

prepareModels() protected abstract method Prepares the data models that will be made available in the current page. protected abstract array prepareModels ( )return array The available data models

data\BaseDataProvider refresh()

refresh() public method 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. public void refresh ( )

data\BaseDataProvider setKeys()

setKeys() public method Sets the key values associated with the data models. public void setKeys ( $keys )$keys array The list of key values corresponding to $models.

data\BaseDataProvider prepareTotalCount()

prepareTotalCount() protected abstract method Returns a value indicating the total number of data models in this data provider. protected abstract integer prepareTotalCount ( )return integer Total number of data models in this data provider.

data\BaseDataProvider prepareKeys()

prepareKeys() protected abstract method Prepares the keys associated with the currently available data models. protected abstract array prepareKeys ( $models )$models array The available data models return array The keys

data\BaseDataProvider prepare()

prepare() public method Prepares the data models and keys. This method will prepare the data models and keys that can be retrieved via getModels() and getKeys(). This method will be implicitly called by getModels() and getKeys() if it has not been called before. public void prepare ( $forcePrepare = false )$forcePrepare boolean Whether to force data preparation even if it has been done before.