$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 following rules will be used to determine the keys of the data models: If $query is an yii\db\ActiveQuery instance, the primary keys of yii\db\ActiveQuery::$modelClass will be used. Otherwise, the keys of the $models array will be used. See also getKeys().
public string|callable $key = null