public function addWidgetConfig(WidgetConfig $widget)
    {
        if ($widget instanceof WidgetContainerConfig) {
            $this->addContainer($widget);
        } elseif (Development::isEnabled()) {
            $this->checkIsValidWidget($widget);
        }

        $this->widgets[] = $widget;
    }
public function addWidgetConfig(WidgetConfig $widget)
    {
        if ($widget instanceof WidgetContainerConfig) {
            $this->addContainer($widget);
        } elseif (Development::isEnabled()) {
            $this->checkIsValidWidget($widget);
        }

        $this->widgets[] = $widget;
    }
public function addWidgetConfig ( WidgetConfig $ widget ) { if ( $ widget instanceof WidgetContainerConfig ) { $ this -> addContainer ( $ widget ) ; } elseif ( Development :: isEnabled ( ) ) { $ this -> checkIsValidWidget ( $ widget ) ; } $ this -> widgets [ ] = $ widget ; }
Adds a new widget to the widget config. Please make sure the widget is enabled before adding a widget as
no such checks will be performed.

@param WidgetConfig $widget
Adds a new widget to the widget config . Please make sure the widget is enabled before adding a widget as no such checks will be performed .