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);
    }
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);
    }
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 ) ; }
Runs DetailView widget based on this GridView.

@param array $config Config that will be passed to [[detailViewClass]] initialisation.
Special element `gridOptions` will be merged to `GridView` initialisation config array.

@throws \yii\base\InvalidConfigException

@return mixed
Runs DetailView widget based on this GridView .