Swat/SwatActionItem.php
public function setWidget(SwatWidget $widget)
    {
        if ($this->widget !== null) {
            throw new SwatException(
                'SwatUI: Only one widget can be nested ' .
                    'within a SwatActionItem'
            );
        }

        $this->widget = $widget;
        $widget->parent = $this;
    }
public function setWidget(SwatWidget $widget)
    {
        if ($this->widget !== null) {
            throw new SwatException(
                'SwatUI: Only one widget can be nested ' .
                    'within a SwatActionItem'
            );
        }

        $this->widget = $widget;
        $widget->parent = $this;
    }
public function setWidget ( SwatWidget $ widget ) { if ( $ this -> widget !== null ) { throw new SwatException ( 'SwatUI: Only one widget can be nested ' . 'within a SwatActionItem' ) ; } $ this -> widget = $ widget ; $ widget -> parent = $ this ; }
Sets the widget to use for this item

Each SwatActionItem can have one associated SwatWidget. This method
sets the widget for this item.

@param SwatWidget $widget the widget associated with this action.

@throws SwatException
Sets the widget to use for this item