src/Sulu/Bundle/TagBundle/Controller/TagController.php
public function postMergeAction(Request $request)
    {
        try {
            $srcTagIds = explode(',', $request->get('src'));
            $destTagId = $request->get('dest');

            $destTag = $this->getManager()->merge($srcTagIds, $destTagId);

            $view = $this->view(
                null,
                303,
                [
                    'location' => $this->get('router')->generate('get_tag', ['id' => $destTag->getId()]),
                ]
            );
        } catch (TagNotFoundException $exc) {
            $entityNotFoundException = new EntityNotFoundException(self::$entityName, $exc->getId());
            $view = $this->view($entityNotFoundException->toArray(), 404);
        }

        return $this->handleView($view);
    }
public function postMergeAction(Request $request)
    {
        try {
            $srcTagIds = explode(',', $request->get('src'));
            $destTagId = $request->get('dest');

            $destTag = $this->getManager()->merge($srcTagIds, $destTagId);

            $view = $this->view(
                null,
                303,
                [
                    'location' => $this->get('router')->generate('get_tag', ['id' => $destTag->getId()]),
                ]
            );
        } catch (TagNotFoundException $exc) {
            $entityNotFoundException = new EntityNotFoundException(self::$entityName, $exc->getId());
            $view = $this->view($entityNotFoundException->toArray(), 404);
        }

        return $this->handleView($view);
    }
public function postMergeAction ( Request $ request ) { try { $ srcTagIds = explode ( ',' , $ request -> get ( 'src' ) ) ; $ destTagId = $ request -> get ( 'dest' ) ; $ destTag = $ this -> getManager ( ) -> merge ( $ srcTagIds , $ destTagId ) ; $ view = $ this -> view ( null , 303 , [ 'location' => $ this -> get ( 'router' ) -> generate ( 'get_tag' , [ 'id' => $ destTag -> getId ( ) ] ) , ] ) ; } catch ( TagNotFoundException $ exc ) { $ entityNotFoundException = new EntityNotFoundException ( self :: $ entityName , $ exc -> getId ( ) ) ; $ view = $ this -> view ( $ entityNotFoundException -> toArray ( ) , 404 ) ; } return $ this -> handleView ( $ view ) ; }
POST Route annotation.

@Post("/tags/merge")

@param Request $request

@return Response
POST Route annotation .