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

        $tagUpdateStruct = $this->tagsService->newTagUpdateStruct();
        $tagUpdateStruct->remoteId = $tag->remoteId;
        $tagUpdateStruct->alwaysAvailable = $tag->alwaysAvailable;

        foreach ($tag->keywords as $keywordLanguageCode => $keyword) {
            $tagUpdateStruct->setKeyword($keyword, $keywordLanguageCode);
        }

        $form = $this->createForm(
            TagUpdateType::class,
            $tagUpdateStruct,
            [
                'action' => $request->getPathInfo(),
                'languageCode' => $languageCode,
                'tag' => $tag,
            ]
        );

        $form->handleRequest($request);

        if ($form->isSubmitted() && $form->isValid()) {
            $updatedTag = $this->tagsService->updateTag($tag, $form->getData());

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

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

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