public function childrenAction(Request $request, Tag $tag = null)
    {
        if (empty($request->request->get('Tags'))) {
            $this->addFlashMessage('errors', 'no_selected_tags');

            return $this->redirectToTag($tag);
        }

        $this->get('session')->set(
            'ngtags_tag_ids',
            $request->request->get('Tags')
        );

        if ($request->request->has('MoveTagsAction')) {
            return $this->redirectToRoute(
                'netgen_tags_admin_tag_move_tags',
                [
                    'parentId' => $tag !== null ? $tag->id : 0,
                ]
            );
        }

        if ($request->request->has('CopyTagsAction')) {
            return $this->redirectToRoute(
                'netgen_tags_admin_tag_copy_tags',
                [
                    'parentId' => $tag !== null ? $tag->id : 0,
                ]
            );
        }

        if ($request->request->has('DeleteTagsAction')) {
            return $this->redirectToRoute(
                'netgen_tags_admin_tag_delete_tags',
                [
                    'parentId' => $tag !== null ? $tag->id : 0,
                ]
            );
        }

        return $this->redirect($request->getPathInfo());
    }
public function childrenAction(Request $request, Tag $tag = null)
    {
        if (empty($request->request->get('Tags'))) {
            $this->addFlashMessage('errors', 'no_selected_tags');

            return $this->redirectToTag($tag);
        }

        $this->get('session')->set(
            'ngtags_tag_ids',
            $request->request->get('Tags')
        );

        if ($request->request->has('MoveTagsAction')) {
            return $this->redirectToRoute(
                'netgen_tags_admin_tag_move_tags',
                [
                    'parentId' => $tag !== null ? $tag->id : 0,
                ]
            );
        }

        if ($request->request->has('CopyTagsAction')) {
            return $this->redirectToRoute(
                'netgen_tags_admin_tag_copy_tags',
                [
                    'parentId' => $tag !== null ? $tag->id : 0,
                ]
            );
        }

        if ($request->request->has('DeleteTagsAction')) {
            return $this->redirectToRoute(
                'netgen_tags_admin_tag_delete_tags',
                [
                    'parentId' => $tag !== null ? $tag->id : 0,
                ]
            );
        }

        return $this->redirect($request->getPathInfo());
    }
public function childrenAction ( Request $ request , Tag $ tag = null ) { if ( empty ( $ request -> request -> get ( 'Tags' ) ) ) { $ this -> addFlashMessage ( 'errors' , 'no_selected_tags' ) ; return $ this -> redirectToTag ( $ tag ) ; } $ this -> get ( 'session' ) -> set ( 'ngtags_tag_ids' , $ request -> request -> get ( 'Tags' ) ) ; if ( $ request -> request -> has ( 'MoveTagsAction' ) ) { return $ this -> redirectToRoute ( 'netgen_tags_admin_tag_move_tags' , [ 'parentId' => $ tag !== null ? $ tag -> id : 0 , ] ) ; } if ( $ request -> request -> has ( 'CopyTagsAction' ) ) { return $ this -> redirectToRoute ( 'netgen_tags_admin_tag_copy_tags' , [ 'parentId' => $ tag !== null ? $ tag -> id : 0 , ] ) ; } if ( $ request -> request -> has ( 'DeleteTagsAction' ) ) { return $ this -> redirectToRoute ( 'netgen_tags_admin_tag_delete_tags' , [ 'parentId' => $ tag !== null ? $ tag -> id : 0 , ] ) ; } return $ this -> redirect ( $ request -> getPathInfo ( ) ) ; }
Action that handles redirection for actions on multiple tags children.

@param \Symfony\Component\HttpFoundation\Request $request
@param \Netgen\TagsBundle\API\Repository\Values\Tags\Tag $tag

@return \Symfony\Component\HttpFoundation\Response
Action that handles redirection for actions on multiple tags children .