<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* ProfileList/list.profiles.html.twig */
class __TwigTemplate_a8169726f405d869ec55b479094189e6 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ProfileList/list.profiles.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ProfileList/list.profiles.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "ProfileList/list.profiles.html.twig"));
// line 1
$context["profiles_array"] = [];
// line 2
echo "
";
// line 3
$context["profiles"] = ((array_key_exists("profileList", $context)) ? ((isset($context["profileList"]) || array_key_exists("profileList", $context) ? $context["profileList"] : (function () { throw new RuntimeError('Variable "profileList" does not exist.', 3, $this->source); })())) : ((isset($context["profiles"]) || array_key_exists("profiles", $context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.', 3, $this->source); })())));
// line 4
echo "
";
// line 5
if (((isset($context["profiles"]) || array_key_exists("profiles", $context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.', 5, $this->source); })()) != null)) {
// line 6
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["profiles"] ?? null), "array", [], "any", true, true, false, 6)) {
// line 7
echo " ";
// line 8
echo " ";
$context["profiles_array"] = twig_get_attribute($this->env, $this->source, (isset($context["profiles"]) || array_key_exists("profiles", $context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.', 8, $this->source); })()), "array", [], "any", false, false, false, 8);
// line 9
echo " ";
if ((array_key_exists("top_profile", $context) && (null != (isset($context["top_profile"]) || array_key_exists("top_profile", $context) ? $context["top_profile"] : (function () { throw new RuntimeError('Variable "top_profile" does not exist.', 9, $this->source); })())))) {
// line 10
echo " ";
$context["profiles_array"] = twig_array_merge([(isset($context["top_profile"]) || array_key_exists("top_profile", $context) ? $context["top_profile"] : (function () { throw new RuntimeError('Variable "top_profile" does not exist.', 10, $this->source); })())], (isset($context["profiles_array"]) || array_key_exists("profiles_array", $context) ? $context["profiles_array"] : (function () { throw new RuntimeError('Variable "profiles_array" does not exist.', 10, $this->source); })()));
// line 11
echo " ";
}
// line 12
echo " ";
} else {
// line 13
echo " ";
// line 14
echo " ";
$context["profiles_array"] = (isset($context["profiles"]) || array_key_exists("profiles", $context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.', 14, $this->source); })());
// line 15
echo " ";
}
}
// line 17
echo "
";
// line 18
$context["hidePreferredButton"] = ((array_key_exists("hidePreferredButton", $context)) ? ((isset($context["hidePreferredButton"]) || array_key_exists("hidePreferredButton", $context) ? $context["hidePreferredButton"] : (function () { throw new RuntimeError('Variable "hidePreferredButton" does not exist.', 18, $this->source); })())) : (false));
// line 19
$context["likeButton"] = ((array_key_exists("likeButton", $context)) ? ((isset($context["likeButton"]) || array_key_exists("likeButton", $context) ? $context["likeButton"] : (function () { throw new RuntimeError('Variable "likeButton" does not exist.', 19, $this->source); })())) : (false));
// line 21
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["profiles_array"]) || array_key_exists("profiles_array", $context) ? $context["profiles_array"] : (function () { throw new RuntimeError('Variable "profiles_array" does not exist.', 21, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["profile"]) {
// line 22
$context["lazyLoad"] = (twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 22) == 1);
// line 23
$this->loadTemplate("ProfileList/profile.html.twig", "ProfileList/list.profiles.html.twig", 23)->display(twig_array_merge($context, ["profile" => $context["profile"], "lazyLoad" => (isset($context["lazyLoad"]) || array_key_exists("lazyLoad", $context) ? $context["lazyLoad"] : (function () { throw new RuntimeError('Variable "lazyLoad" does not exist.', 23, $this->source); })())]));
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['profile'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
if (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 26, $this->source); })()), "request", [], "any", false, false, false, 26), "method", [], "any", false, false, false, 26) == "GET") && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 26, $this->source); })()), "request", [], "any", false, false, false, 26), "isXmlHttpRequest", [], "method", false, false, false, 26))) {
// line 27
echo $this->extensions['Porpaginas\Twig\PorpaginasExtension']->renderPagination($this->env, (isset($context["profiles"]) || array_key_exists("profiles", $context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.', 27, $this->source); })()));
}
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "ProfileList/list.profiles.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 129 => 27, 127 => 26, 113 => 23, 111 => 22, 94 => 21, 92 => 19, 90 => 18, 87 => 17, 83 => 15, 80 => 14, 78 => 13, 75 => 12, 72 => 11, 69 => 10, 66 => 9, 63 => 8, 61 => 7, 58 => 6, 56 => 5, 53 => 4, 51 => 3, 48 => 2, 46 => 1,);
}
public function getSourceContext()
{
return new Source("{% set profiles_array = [] %}
{% set profiles = profileList is defined ? profileList : profiles %}
{% if profiles != null %}
{% if profiles.array is defined %}
{# Legacy listing provider #}
{% set profiles_array = profiles.array %}
{% if top_profile is defined and null != top_profile %}
{% set profiles_array = [top_profile]|merge(profiles_array) %}
{% endif %}
{% else %}
{# New listing microservice. Profiles array already contains top placement #}
{% set profiles_array = profiles %}
{% endif %}
{% endif %}
{% set hidePreferredButton = hidePreferredButton is defined ? hidePreferredButton : false %}
{% set likeButton = likeButton is defined ? likeButton : false %}
{%- for profile in profiles_array -%}
{%- set lazyLoad = loop.index == 1 -%}
{% include 'ProfileList/profile.html.twig' with {profile: profile, lazyLoad: lazyLoad} %}
{%- endfor -%}
{%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
\t{{- porpaginas_render(profiles) -}}
{% endif %}
", "ProfileList/list.profiles.html.twig", "/app/templates/ProfileList/list.profiles.html.twig");
}
}