var/cache/review/twig/44/44c3df4f7ed8269eeb6dbbee14f70c41.php line 104

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* ProfileList/list.profiles.html.twig */
  14. class __TwigTemplate_a8169726f405d869ec55b479094189e6 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  30.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""ProfileList/list.profiles.html.twig"));
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""ProfileList/list.profiles.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""ProfileList/list.profiles.html.twig"));
  35.         // line 1
  36.         $context["profiles_array"] = [];
  37.         // line 2
  38.         echo "
  39. ";
  40.         // line 3
  41.         $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); })())));
  42.         // line 4
  43.         echo "
  44. ";
  45.         // line 5
  46.         if (((isset($context["profiles"]) || array_key_exists("profiles"$context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.'5$this->source); })()) != null)) {
  47.             // line 6
  48.             echo "    ";
  49.             if (twig_get_attribute($this->env$this->source, ($context["profiles"] ?? null), "array", [], "any"truetruefalse6)) {
  50.                 // line 7
  51.                 echo "        ";
  52.                 // line 8
  53.                 echo "        ";
  54.                 $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"falsefalsefalse8);
  55.                 // line 9
  56.                 echo "    ";
  57.             } else {
  58.                 // line 10
  59.                 echo "        ";
  60.                 // line 11
  61.                 echo "        ";
  62.                 $context["profiles_array"] = (isset($context["profiles"]) || array_key_exists("profiles"$context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.'11$this->source); })());
  63.                 // line 12
  64.                 echo "    ";
  65.             }
  66.         }
  67.         // line 14
  68.         echo "
  69. ";
  70.         // line 15
  71.         $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.'15$this->source); })())) : (false));
  72.         // line 16
  73.         $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.'16$this->source); })())) : (false));
  74.         // line 18
  75.         $context['_parent'] = $context;
  76.         $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.'18$this->source); })()));
  77.         $context['loop'] = [
  78.           'parent' => $context['_parent'],
  79.           'index0' => 0,
  80.           'index'  => 1,
  81.           'first'  => true,
  82.         ];
  83.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  84.             $length count($context['_seq']);
  85.             $context['loop']['revindex0'] = $length 1;
  86.             $context['loop']['revindex'] = $length;
  87.             $context['loop']['length'] = $length;
  88.             $context['loop']['last'] = === $length;
  89.         }
  90.         foreach ($context['_seq'] as $context["_key"] => $context["profile"]) {
  91.             // line 19
  92.             $context["lazyLoad"] = (twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse19) == 1);
  93.             // line 20
  94.             $this->loadTemplate("ProfileList/profile.html.twig""ProfileList/list.profiles.html.twig"20)->display(twig_array_merge($context, ["profile" =>             // line 21
  95. $context["profile"], "lazyLoad" =>             // line 22
  96. (isset($context["lazyLoad"]) || array_key_exists("lazyLoad"$context) ? $context["lazyLoad"] : (function () { throw new RuntimeError('Variable "lazyLoad" does not exist.'22$this->source); })()), "isProfileTop" => (twig_get_attribute($this->env$this->source,             // line 23
  97. $context["loop"], "first", [], "any"falsefalsefalse23) && $this->extensions['App\Twig\PaidPlacementsExtension']->isTopPlacement($context["profile"])), "isFetchPriority" => (twig_get_attribute($this->env$this->source,             // line 24
  98. $context["loop"], "index", [], "any"falsefalsefalse24) < 3)]));
  99.             ++$context['loop']['index0'];
  100.             ++$context['loop']['index'];
  101.             $context['loop']['first'] = false;
  102.             if (isset($context['loop']['length'])) {
  103.                 --$context['loop']['revindex0'];
  104.                 --$context['loop']['revindex'];
  105.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  106.             }
  107.         }
  108.         $_parent $context['_parent'];
  109.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['profile'], $context['_parent'], $context['loop']);
  110.         $context array_intersect_key($context$_parent) + $_parent;
  111.         // line 28
  112.         if (((twig_get_attribute($this->env$this->sourcetwig_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.'28$this->source); })()), "request", [], "any"falsefalsefalse28), "method", [], "any"falsefalsefalse28) == "GET") && twig_get_attribute($this->env$this->sourcetwig_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.'28$this->source); })()), "request", [], "any"falsefalsefalse28), "isXmlHttpRequest", [], "method"falsefalsefalse28))) {
  113.             // line 29
  114.             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.'29$this->source); })()));
  115.         }
  116.         
  117.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  118.         
  119.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  120.         
  121.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  122.     }
  123.     /**
  124.      * @codeCoverageIgnore
  125.      */
  126.     public function getTemplateName()
  127.     {
  128.         return "ProfileList/list.profiles.html.twig";
  129.     }
  130.     /**
  131.      * @codeCoverageIgnore
  132.      */
  133.     public function isTraitable()
  134.     {
  135.         return false;
  136.     }
  137.     /**
  138.      * @codeCoverageIgnore
  139.      */
  140.     public function getDebugInfo()
  141.     {
  142.         return array (  124 => 29,  122 => 28,  108 => 24,  107 => 23,  106 => 22,  105 => 21,  104 => 20,  102 => 19,  85 => 18,  83 => 16,  81 => 15,  78 => 14,  74 => 12,  71 => 11,  69 => 10,  66 => 9,  63 => 8,  61 => 7,  58 => 6,  56 => 5,  53 => 4,  51 => 3,  48 => 2,  46 => 1,);
  143.     }
  144.     public function getSourceContext()
  145.     {
  146.         return new Source("{% set profiles_array = [] %}
  147. {% set profiles = profileList is defined ? profileList : profiles %}
  148. {% if profiles != null %}
  149.     {% if profiles.array is defined %}
  150.         {# Legacy listing provider #}
  151.         {% set profiles_array = profiles.array %}
  152.     {% else %}
  153.         {# New listing microservice. Profiles array already contains top placement #}
  154.         {% set profiles_array = profiles %}
  155.     {% endif %}
  156. {% endif %}
  157. {% set hidePreferredButton = hidePreferredButton is defined ? hidePreferredButton : false %}
  158. {% set likeButton = likeButton is defined ? likeButton : false %}
  159. {%- for profile in profiles_array -%}
  160.     {%- set lazyLoad = loop.index == 1 -%}
  161.     {% include 'ProfileList/profile.html.twig' with {
  162.         profile: profile,
  163.         lazyLoad: lazyLoad,
  164.         isProfileTop: (loop.first and profile is top_placement),
  165.         isFetchPriority: loop.index < 3
  166.     } %}
  167. {%- endfor -%}
  168. {%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
  169. \t{{- porpaginas_render(profiles) -}}
  170. {% endif %}
  171. ""ProfileList/list.profiles.html.twig""/app/templates/ProfileList/list.profiles.html.twig");
  172.     }
  173. }