{% for field in form.children %}
{% if field.vars.name not in ['adress', 'save', 'publish', 'cancel', 'duration', 'city'] %}
{{ form_row(field) }}
{% endif %}
{% endfor %}
{% set canCreate = is_granted('EVENT_CREATE') %}
{% set canEdit = id is not null and is_granted('EVENT_EDIT', initialFormData) %}
{% set canManage = (id is null and canCreate) or canEdit %}
{% if canManage and not is_granted('ROLE_ADMIN') %}
{% endif %}
{% if canManage and not is_granted('ROLE_ADMIN') %}
{% endif %}
{% if id is not null and is_granted('EVENT_CANCEL', initialFormData) %}
{% endif %}
Retour au menu