widgets/base/Widget.php
public static function display($config = array())
    {
        ob_start();
        ob_implicit_flush(false);
        /** @var Widget $widget */
        $config['class'] = get_called_class();
        $widget          = \Yii::createComponent($config);
        $widget->init();
        $widget->run();
        return ob_get_clean();
    }
public static function display($config = array())
    {
        ob_start();
        ob_implicit_flush(false);
        /** @var Widget $widget */
        $config['class'] = get_called_class();
        $widget          = \Yii::createComponent($config);
        $widget->init();
        $widget->run();
        return ob_get_clean();
    }
public static function display ( $ config = array ( ) ) { ob_start ( ) ; ob_implicit_flush ( false ) ; /** @var Widget $widget */ $ config [ 'class' ] = get_called_class ( ) ; $ widget = \ Yii :: createComponent ( $ config ) ; $ widget -> init ( ) ; $ widget -> run ( ) ; return ob_get_clean ( ) ; }
Ported from Yii2 widget's function. Creates a widget instance and runs it. We cannot use 'widget' name as it
conflicts with CBaseController component.

The widget rendering result is returned by this method.
@param array $config name-value pairs that will be used to initialize the object properties
@return string the rendering result of the widget.
Ported from Yii2 widget s function . Creates a widget instance and runs it . We cannot use widget name as it conflicts with CBaseController component .