{% if object.contact is not empty and object.contact.id is not empty %} {% set contact = object.contact %} {% set contactAdmin = null %} {% if contact|instanceof('AppBundle\\Entity\\Contact\\ContactGroup') %} {% set contactAdmin = admin.getAdminByCode('app_bundle.admin.contact.group') %} {% set see_card_trans = 'link.see_tab_group_contact_card' %} {% elseif contact|instanceof('AppBundle\\Entity\\Contact\\ContactProfessional') %} {% set contactAdmin = admin.getAdminByCode('app_bundle.admin.contact.professional') %} {% set see_card_trans = 'link.see_tab_professional_contact_card' %} {% else %} {% set contactAdmin = admin.getAdminByCode('app_bundle.admin.contact.individual') %} {% set see_card_trans = 'link.see_tab_individual_contact_card' %} {% endif %} {% set tabUrls = [] %} {% set tabRoutes = contactAdmin.getTabRoutesNames() %} {% for routeName in tabRoutes %} {% if contactAdmin.hasRoute(routeName) and contactAdmin.hasRouteGranted(contactAdmin.getCode(), routeName, contact) %} {% set urlRow = contactAdmin.generateObjectUrl(routeName, contact) %} {% set tabUrls = tabUrls|merge({(routeName): urlRow}) %} {% endif %} {% endfor %} {% if tabUrls is not empty %}
{% endif %} {% endif %}