new TwigFunction('field_value',
$this->
getFieldValue(...
)),
new TwigFunction('field_label',
$this->
getFieldLabel(...
)),
new TwigFunction('field_help',
$this->
getFieldHelp(...
)),
new TwigFunction('field_errors',
$this->
getFieldErrors(...
)),
new TwigFunction('field_choices',
$this->
getFieldChoices(...
)),
];
} public function getFilters(): array
{ return [ new TwigFilter('humanize',
[FormRenderer::
class, 'humanize'
]),
new TwigFilter('form_encode_currency',
[FormRenderer::
class, 'encodeCurrency'
],
['is_safe' =>
['html'
], 'needs_environment' => true
]),
];
} public function getTests(): array
{ return [ new TwigTest('selectedchoice', 'Symfony\Bridge\Twig\Extension\twig_is_selected_choice'
),
new TwigTest('rootform', 'Symfony\Bridge\Twig\Extension\twig_is_root_form'
),
];
}