main/core/Entity/Widget/WidgetContainer.php
public function addInstance(WidgetInstance $instance)
    {
        if (!$this->instances->contains($instance)) {
            $this->instances->add($instance);
            $instance->setContainer($this);
        }
    }
public function addInstance(WidgetInstance $instance)
    {
        if (!$this->instances->contains($instance)) {
            $this->instances->add($instance);
            $instance->setContainer($this);
        }
    }
public function addInstance ( WidgetInstance $ instance ) { if ( ! $ this -> instances -> contains ( $ instance ) ) { $ this -> instances -> add ( $ instance ) ; $ instance -> setContainer ( $ this ) ; } }
Add a WidgetInstance into the container.

@param WidgetInstance $instance
Add a WidgetInstance into the container .