{% if ajax is not defined %} {% set ajax = false %} {% endif %} {% extends ajax ? 'Admin/admin.html.twig' : 'Admin/base.html.twig' %} {% block content %} {% if view is defined and view %} {% include(view) %} {% else %} {% set entity = app.request.attributes.get("_controller")|split("Controller")[1]|split("\\")[1] %} {% include(''~entity~'/form.html.twig') %} {% endif %} {% endblock %}