skeeks\cms\traits\WidgetTrait::begin PHP 메소드

begin() 공개 정적인 메소드

This method creates an instance of the calling class. It will apply the configuration to the created instance. A matching WidgetTrait::end call should be called later.
public static begin ( array $config = [] ) : static
$config array name-value pairs that will be used to initialize the object properties
리턴 static the newly created widget instance
    public static function begin($config = [])
    {
        $config['class'] = get_called_class();
        /* @var $widget Widget */
        $widget = Yii::createObject($config);
        static::$stack[] = $widget;
        return $widget;
    }