public static function detailView(array $config = [])
    {
        /** @var static $grid */
        $grid = Yii::createObject(ArrayHelper::merge([
            'class' => get_called_class(),
            'dataProvider' => new ArrayDataProvider(['allModels' => [$config['model']]]),
        ], ArrayHelper::remove($config, 'gridOptions', [])));
        $class = $grid->detailViewClass ?: DetailView::class;
        $config['grid'] = $grid;

        return call_user_func([$class, 'widget'], $config);
    }