data\BaseDataProvider $id

$id public property An ID that uniquely identifies the data provider among all data providers. You should set this property if the same page contains two or more different data providers. Otherwise, the $pagination and $sort may not work properly. public string $id = null

data\BaseDataProvider $count

$count public read-only property The number of data models in the current page. public integer getCount ( )

data\BaseDataProvider $keys

$keys public property The list of key values corresponding to $models. Each data model in $models is uniquely identified by the corresponding key value in this array. public array getKeys ( )public void setKeys ( $keys )

data\ArrayDataProvider prepareModels()

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

data\ArrayDataProvider prepareTotalCount()

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

data\ArrayDataProvider sortModels()

sortModels() protected method Sorts the data models according to the given sort definition protected array sortModels ( $models, $sort )$models array The models to be sorted $sort yii\data\Sort The sort definition return array The sorted data models

data\ArrayDataProvider $key

$key public property The column that is used as the key of the data models. This can be either a column name, or a callable that returns the key value of a given data model. If this is not set, the index of the $models array will be used. See also getKeys(). public string|callable $key = null

data\ArrayDataProvider $allModels

$allModels public property The data that is not paginated or sorted. When pagination is enabled, this property usually contains more elements than $models. The array elements must use zero-based integer keys. public array $allModels = null

data\ArrayDataProvider prepareKeys()

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

data\ArrayDataProvider $modelClass

$modelClass public property (available since version 2.0.9) The name of the Model class that will be represented. This property is used to get columns' names. public string $modelClass = null