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

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