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

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.     {% else %}
  8.         {# New listing microservice. Profiles array already contains top placement #}
  9.         {% set profiles_array = profiles %}
  10.     {% endif %}
  11. {% endif %}
  12. {% set hidePreferredButton = hidePreferredButton is defined ? hidePreferredButton : false %}
  13. {% set likeButton = likeButton is defined ? likeButton : false %}
  14. {%- for profile in profiles_array -%}
  15.     {%- set lazyLoad = loop.index == 1 -%}
  16.     {% include 'ProfileList/profile.html.twig' with {
  17.         profile: profile,
  18.         lazyLoad: lazyLoad,
  19.         isProfileTop: (loop.first and profile is top_placement)
  20.     } %}
  21. {%- endfor -%}
  22. {%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
  23.     {{- porpaginas_render(profiles) -}}
  24. {% endif %}