templates/ProfileList/list.profiles.html.twig line 1

Open in your IDE?
  1. {% set profiles_array = [] %}
  2. {% if profiles != null %}
  3.     {% if profiles.array is defined %}
  4.         {# Legacy listing provider #}
  5.         {% set profiles_array = profiles.array %}
  6.         {% if top_profile is defined and null != top_profile %}
  7.             {% set profiles_array = [top_profile]|merge(profiles_array) %}
  8.         {% endif %}
  9.     {% else %}
  10.         {# New listing microservice. Profiles array already contains top placement #}
  11.         {% set profiles_array = profiles %}
  12.     {% endif %}
  13. {% endif %}
  14. {% set hidePreferredButton = hidePreferredButton is defined ? hidePreferredButton : false %}
  15. {% set likeButton = likeButton is defined ? likeButton : false %}
  16. {%- for profile in profiles_array -%}
  17.     {%- set lazyLoad = loop.index == 1 -%}
  18.     {% include 'ProfileList/profile.html.twig' with {profile: profile, lazyLoad: lazyLoad} %}
  19. {%- endfor -%}
  20. {%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
  21.     {{- porpaginas_render(profiles) -}}
  22. {% endif %}