프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$db | the DB connection object or the application component ID of the DB connection. If not set, the default DB connection will be used. Starting from version 2.0.2, this can also be a configuration array for creating the object. | ||
$key | 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 following rules will be used to determine the keys of the data models: - If [[query]] is an ActiveQuery instance, the primary keys of [[\yii\db\ActiveQuery::modelClass]] will be used. - Otherwise, the keys of the [[models]] array will be used. | ||
$query | the query that is used to fetch data models and [[totalCount]] if it is not explicitly set. |
메소드 | 설명 | |
---|---|---|
init ( ) | Initializes the DB connection component. | |
setSort ( $value ) |
메소드 | 설명 | |
---|---|---|
prepareKeys ( $models ) | ||
prepareModels ( ) | ||
prepareTotalCount ( ) |
public init ( ) |
public $db |
public $key |