public function swapLocation($locationPath, Request $request)
    {
        $locationId = $this->extractLocationIdFromPath($locationPath);
        $location = $this->locationService->loadLocation($locationId);

        $destinationLocation = $this->locationService->loadLocation(
            $this->extractLocationIdFromPath(
                $this->requestParser->parseHref(
                    $request->headers->get('Destination'),
                    'locationPath'
                )
            )
        );

        $this->locationService->swapLocation($location, $destinationLocation);

        return new Values\NoContent();
    }
public function swapLocation($locationPath, Request $request)
    {
        $locationId = $this->extractLocationIdFromPath($locationPath);
        $location = $this->locationService->loadLocation($locationId);

        $destinationLocation = $this->locationService->loadLocation(
            $this->extractLocationIdFromPath(
                $this->requestParser->parseHref(
                    $request->headers->get('Destination'),
                    'locationPath'
                )
            )
        );

        $this->locationService->swapLocation($location, $destinationLocation);

        return new Values\NoContent();
    }
public function swapLocation ( $ locationPath , Request $ request ) { $ locationId = $ this -> extractLocationIdFromPath ( $ locationPath ) ; $ location = $ this -> locationService -> loadLocation ( $ locationId ) ; $ destinationLocation = $ this -> locationService -> loadLocation ( $ this -> extractLocationIdFromPath ( $ this -> requestParser -> parseHref ( $ request -> headers -> get ( 'Destination' ) , 'locationPath' ) ) ) ; $ this -> locationService -> swapLocation ( $ location , $ destinationLocation ) ; return new Values \ NoContent ( ) ; }
Swaps a location with another one.

@param string $locationPath

@return \eZ\Publish\Core\REST\Server\Values\NoContent
Swaps a location with another one .