{% import 'AppBundle:Admin:Common\\Macro\\macro_admin.html.twig' as macro_admin %} {% if customOrderFormAdmin is null %} {% set sellingAdminCode = macro_admin.getAdministrativeSellingAdminCode(orderForm, admin)|spaceless %} {% set customOrderFormAdmin = admin.getAdminByCode(sellingAdminCode) %} {% endif %} {% set tabUrls = [] %} {% set tabRoutes = customOrderFormAdmin.getTabRoutesNames() %} {% for routeName in tabRoutes %} {% if customOrderFormAdmin.hasRoute(routeName) and customOrderFormAdmin.hasRouteGranted(customOrderFormAdmin.getCode(), routeName, orderForm) %} {% set urlRow = customOrderFormAdmin.generateObjectUrl(routeName, orderForm) %} {% set tabUrls = tabUrls|merge({(routeName): urlRow}) %} {% endif %} {% endfor %} {% set typeGetterName = 'getType' %} {% set type = attribute(orderForm, typeGetterName) %} {% set see_card_trans = type == constant("AppBundle\\Entity\\Administrative\\Selling\\AdministrativeSellingBase::ADMINISTRATIVE_SELLING_TYPE_ESTIMATE") ? 'link.see_tab_estimate_card' : 'link.see_tab_order_form_card' %}