Sulu\Bundle\MediaBundle\Controller\CollectionController::moveEntity PHP Method

moveEntity() protected method

Moves an entity into another one.
protected moveEntity ( integer $id, Request $request ) : Response
$id integer
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\Response
    protected function moveEntity($id, Request $request)
    {
        $destinationId = $this->getRequestParameter($request, 'destination');
        $locale = $this->getRequestParameter($request, 'locale', true);
        $collection = $this->getCollectionManager()->move($id, $locale, $destinationId);
        $view = $this->view($collection);
        return $this->handleView($view);
    }