<?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
if (((isset($context["profiles"]) || array_key_exists("profiles", $context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.', 3, $this->source); })()) != null)) {
// line 4
echo " ";
if (twig_get_attribute($this->env, $this->source, ($context["profiles"] ?? null), "array", [], "any", true, true, false, 4)) {
// line 5
echo " ";
// line 6
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.', 6, $this->source); })()), "array", [], "any", false, false, false, 6);
// line 7
echo " ";
} else {
// line 8
echo " ";
// line 9
echo " ";
$context["profiles_array"] = (isset($context["profiles"]) || array_key_exists("profiles", $context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.', 9, $this->source); })());
// line 10
echo " ";
}
}
// line 12
echo "
";
// line 13
$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.', 13, $this->source); })())) : (false));
// line 14
$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.', 14, $this->source); })())) : (false));
// line 16
$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.', 16, $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 17
$context["lazyLoad"] = (twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 17) == 1);
// line 18
$this->loadTemplate("ProfileList/profile.html.twig", "ProfileList/list.profiles.html.twig", 18)->display(twig_array_merge($context, ["profile" => // line 19
$context["profile"], "lazyLoad" => // line 20
(isset($context["lazyLoad"]) || array_key_exists("lazyLoad", $context) ? $context["lazyLoad"] : (function () { throw new RuntimeError('Variable "lazyLoad" does not exist.', 20, $this->source); })()), "isProfileTop" => (twig_get_attribute($this->env, $this->source, // line 21
$context["loop"], "first", [], "any", false, false, false, 21) && $this->extensions['App\Twig\PaidPlacementsExtension']->isTopPlacement($context["profile"]))]));
++$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 25
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.', 25, $this->source); })()), "request", [], "any", false, false, false, 25), "method", [], "any", false, false, false, 25) == "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.', 25, $this->source); })()), "request", [], "any", false, false, false, 25), "isXmlHttpRequest", [], "method", false, false, false, 25))) {
// line 26
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.', 26, $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 ( 118 => 26, 116 => 25, 102 => 21, 101 => 20, 100 => 19, 99 => 18, 97 => 17, 80 => 16, 78 => 14, 76 => 13, 73 => 12, 69 => 10, 66 => 9, 64 => 8, 61 => 7, 58 => 6, 56 => 5, 53 => 4, 51 => 3, 48 => 2, 46 => 1,);
}
public function getSourceContext()
{
return new Source("{% set profiles_array = [] %}
{% if profiles != null %}
{% if profiles.array is defined %}
{# Legacy listing provider #}
{% set profiles_array = profiles.array %}
{% 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,
isProfileTop: (loop.first and profile is top_placement)
} %}
{%- 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");
}
}