Bundle/WidgetMapBundle/Manager/WidgetMapManager.php
protected function moveWidgetMap(View $view, WidgetMap $widgetMap, $parent = false, $position = false, $slot = false)
    {
        if ($widgetMap->getView() !== $view) {
            $widgetMap = $this->cloneWidgetMap($widgetMap, $view);
        }

        if ($parent !== false) {
            if ($oldParent = $widgetMap->getParent()) {
                $oldParent->removeChild($widgetMap);
            }
            $widgetMap->setParent($parent);
            if ($parent) {
                $parent->addChild($widgetMap);
            }
        }
        if ($position !== false) {
            $widgetMap->setPosition($position);
        }
        if ($slot !== false) {
            $widgetMap->setSlot($slot);
        }

        return $widgetMap;
    }
protected function moveWidgetMap(View $view, WidgetMap $widgetMap, $parent = false, $position = false, $slot = false)
    {
        if ($widgetMap->getView() !== $view) {
            $widgetMap = $this->cloneWidgetMap($widgetMap, $view);
        }

        if ($parent !== false) {
            if ($oldParent = $widgetMap->getParent()) {
                $oldParent->removeChild($widgetMap);
            }
            $widgetMap->setParent($parent);
            if ($parent) {
                $parent->addChild($widgetMap);
            }
        }
        if ($position !== false) {
            $widgetMap->setPosition($position);
        }
        if ($slot !== false) {
            $widgetMap->setSlot($slot);
        }

        return $widgetMap;
    }
protected function moveWidgetMap ( View $ view , WidgetMap $ widgetMap , $ parent = false , $ position = false , $ slot = false ) { if ( $ widgetMap -> getView ( ) !== $ view ) { $ widgetMap = $ this -> cloneWidgetMap ( $ widgetMap , $ view ) ; } if ( $ parent !== false ) { if ( $ oldParent = $ widgetMap -> getParent ( ) ) { $ oldParent -> removeChild ( $ widgetMap ) ; } $ widgetMap -> setParent ( $ parent ) ; if ( $ parent ) { $ parent -> addChild ( $ widgetMap ) ; } } if ( $ position !== false ) { $ widgetMap -> setPosition ( $ position ) ; } if ( $ slot !== false ) { $ widgetMap -> setSlot ( $ slot ) ; } return $ widgetMap ; }
Move given WidgetMap as a child of given parent at given position and slot.

@param View      $view
@param WidgetMap $widgetMap
@param bool      $parent
@param bool      $position
@param bool      $slot

@return WidgetMap
Move given WidgetMap as a child of given parent at given position and slot .