{% set dropdownAction ={} %} {% for action in actions %} {% if action.group is defined and action.group==true %} {% set dropdownAction = dropdownAction|merge({(loop.index0): action}) %} {% else %} {% set display_button = true %} {% if 'list' == action.name %} {% set action_href = request_parameters.referer|default('') ? request_parameters.referer|easyadmin_urldecode : path('easyadmin', request_parameters|merge({ action: 'list' })) %} {% elseif 'method' == action.type %} {% set action_href = path('easyadmin', request_parameters|merge({ action: action.name, id: item_id })) %} {% elseif 'route' == action.type %} {% set action_href = path(action.name, request_parameters|merge({ action: action.name, id: item_id })) %} {% elseif 'productfamily_advanced_editing' == action.type %} {% set action_href = path('easyadmin', request_parameters|merge({ action: action.action, id: item_id })) %} {% if action.name == 'products' and not item.activeProducts %} {% set display_button = false %} {% endif %} {% endif %} {% if display_button %} {{ include(action.template, { action: action, action_href: action_href, is_dropdown: is_dropdown|default(false), item: item, item_id: item_id, request_parameters: request_parameters, translation_domain: translation_domain, trans_parameters: trans_parameters, }, with_context = false) }} {% endif %} {% endif %} {% endfor %} {% if dropdownAction|length > 0 %}
{% endif %}