public static function getDropDownItems($query)
    {
        if ($query instanceof ActiveQuery) {
            $query->defaultOrder();
        }

        /** @var \yii\db\ActiveRecord|\netis\rbac\AuthorizerBehavior $model */
        $model = new $query->modelClass;

        $fields = $model::primaryKey();
        if (($labelAttributes = $model->getBehavior('labels')->attributes) !== null) {
            $fields = array_merge($model::primaryKey(), $labelAttributes);
        }

        $flippedPrimaryKey = array_flip($model::primaryKey());
        return ArrayHelper::map(
            $query->from($model::tableName() . ' t')->all(),
            function ($item) use ($fields, $flippedPrimaryKey) {
                /** @var \netis\crud\db\ActiveRecord $item */
                return Action::exportKey(array_intersect_key($item->toArray($fields, []), $flippedPrimaryKey));
            },
            function ($item) use ($fields) {
                /** @var \netis\crud\db\ActiveRecord $item */
                $data = $item->toArray($fields, []);
                return $data['_label'];
            }
        );
    }