protected function translateLabel(AbstractWidget $tag, Renderer $renderer) { $labelTag = $tag->getLabel(); if ($labelTag) { $newLabel = $this->getStringTranslation($labelTag->getContent()[0], $renderer->getOption('language')); $labelTag->setContent($newLabel); } }
protected function addLabelForAttribute(AbstractWidget $tag, Renderer $renderer) { if (!$tag->getLabel()->get('for')) { $tag->getLabel()->set('for', $this->getFormIdPrefix($tag, $renderer)); } }