Swat/SwatContainer.php
public function packStart(SwatWidget $widget)
    {
        if ($widget->parent !== null) {
            throw new SwatException(
                'Attempting to add a widget that already has a parent.'
            );
        }

        array_unshift($this->children, $widget);
        $widget->parent = $this;

        if ($widget->id !== null) {
            $this->children_by_id[$widget->id] = $widget;
        }

        $this->sendAddNotifySignal($widget);
    }
public function packStart(SwatWidget $widget)
    {
        if ($widget->parent !== null) {
            throw new SwatException(
                'Attempting to add a widget that already has a parent.'
            );
        }

        array_unshift($this->children, $widget);
        $widget->parent = $this;

        if ($widget->id !== null) {
            $this->children_by_id[$widget->id] = $widget;
        }

        $this->sendAddNotifySignal($widget);
    }
public function packStart ( SwatWidget $ widget ) { if ( $ widget -> parent !== null ) { throw new SwatException ( 'Attempting to add a widget that already has a parent.' ) ; } array_unshift ( $ this -> children , $ widget ) ; $ widget -> parent = $ this ; if ( $ widget -> id !== null ) { $ this -> children_by_id [ $ widget -> id ] = $ widget ; } $ this -> sendAddNotifySignal ( $ widget ) ; }
Adds a widget to start

Adds a widget to the start of the list of widgets in this container.

@param SwatWidget $widget a reference to the widget to add.
Adds a widget to start