public function buildView(FormView $view, FormInterface $form, array $options) { /** @var ChoiceView $choice */ foreach ($view->vars['choices'] as $choice) { $choice->label = str_repeat('— ', $choice->data->getLevel()) . $choice->label; } }