{% macro recursiveCategory(categories) %} {% import _self as macros %} {% for category in categories %} {% set image = category.imageUrl ? category.imageUrl : getImage(categories_images ~ category.image.name) %}
  • {{ category|upper }} {{ category.productCategories|length }} {% if category.enabled %} {{ 'app.shop_owner.pages.products.list.enabled'|trans }} {% else %} {{ 'app.shop_owner.pages.products.list.disabled'|trans }} {% endif %} {% if category.visible %} {{ 'app.shop_owner.pages.products.list.visible'|trans }} {% else %} {{ 'app.shop_owner.pages.products.list.invisible'|trans }} {% endif %} {% if category.productCategories|length > 0 %} {{ link('show_products',path('foxorders_shop_product_index', {'id': category.menu.id, 'categories': category.id})) }} {% endif %} {{ link('edit','modal', 'success', {'entity-id' : category.id, 'entity-name' : category, 'modalId': 'foxorders_modal_form_menu' }) }} {% include 'Includes/delete.html.twig' with { 'route': path('foxorders_shop_category_delete', {'id': category.id }) , 'token': csrf_token('delete' ~ category.id), 'button': 'list_delete' } %}
    {% if category.categories %}
      {{ macros.recursiveCategory(category.categories) }}
    {% endif %}
  • {% endfor %} {% endmacro %} {% import _self as macros %} {% if categories %}
      {{ macros.recursiveCategory(categories) }}
    {% endif %}