public function __invoke(Tag $tag, Renderer $renderer) { if ($tag instanceof Form) { $tag->addClass('form-horizontal'); } if ($tag instanceof AbstractWidget && !$tag instanceof Group && $tag->getLabel() && $tag->getInput()) { $tag->getLabel()->addClass('col-sm-3'); $tag->getInput()->wrap('<div class="col-sm-9">', '</div>'); if ($tag->getHint()) { $tag->getHint()->addClass('col-sm-9 col-sm-push-3'); } } return $tag; }
protected function addLabelClass(Tag $tag) { if ($tag->getLabel()) { $tag->getLabel()->addClass('form-label'); } }