fix TreeBuilder deprecation

This commit is contained in:
Tchama 2020-09-05 15:37:43 +02:00
parent d09f3c43c9
commit 92f3926bbf
2 changed files with 5 additions and 5 deletions

View File

@ -17,8 +17,8 @@ class Configuration implements ConfigurationInterface
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('chill_amli_budget');
$treeBuilder = new TreeBuilder('chill_amli_budget');
$rootNode = $treeBuilder->getRootNode('chill_amli_budget');
$rootNode
->children()

View File

@ -14,14 +14,14 @@
<dd>{{ element.type|budget_element_type_display('resource') }}</dd>
<dt>{{ 'Amount'|trans }}</dt>
<dd>{{ element.amount|localizedcurrency('EUR') }}</dd>
<dd>{{ element.amount|format_currency('EUR') }}</dd>
<dt>{{ 'Validity period'|trans }}</dt>
<dd>
{% if element.endDate is not null %}
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': element.startDate|localizeddate('long', 'none'), '%endDate%': familyMember.endDate|localizeddate('long', 'none') } ) }}
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': element.startDate|format_date('long', 'none'), '%endDate%': familyMember.endDate|format_date('long', 'none') } ) }}
{% else %}
{{ 'Valid since %startDate%'|trans( { '%startDate%': element.startDate|localizeddate('long', 'none') } ) }}
{{ 'Valid since %startDate%'|trans( { '%startDate%': element.startDate|format_date('long', 'none') } ) }}
{% endif %}
</dd>