public function deleteTagAction(Request $request, Tag $tag)
    {
        $this->denyAccessUnlessGranted('ez:tags:delete' . ($tag->isSynonym() ? 'synonym' : ''));

        if ($request->request->has('DeleteTagButton')) {
            if (!$this->isCsrfTokenValid('eztags_admin', $request->request->get('_csrf_token'))) {
                $this->addFlashMessage('errors', 'invalid_csrf_token');

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

            $this->tagsService->deleteTag($tag);

            $this->addFlashMessage('success', 'tag_deleted', ['%tagKeyword%' => $tag->keyword]);

            return $this->redirectToTag();
        }

        return $this->render(
            '@NetgenTags/admin/tag/delete.html.twig',
            [
                'tag' => $tag,
            ]
        );
    }