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

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.         if (((isset($context["profiles"]) || array_key_exists("profiles"$context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.'3$this->source); })()) != null)) {
  42.             // line 4
  43.             echo "    ";
  44.             if (twig_get_attribute($this->env$this->source, ($context["profiles"] ?? null), "array", [], "any"truetruefalse4)) {
  45.                 // line 5
  46.                 echo "        ";
  47.                 // line 6
  48.                 echo "        ";
  49.                 $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"falsefalsefalse6);
  50.                 // line 7
  51.                 echo "    ";
  52.             } else {
  53.                 // line 8
  54.                 echo "        ";
  55.                 // line 9
  56.                 echo "        ";
  57.                 $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); })());
  58.                 // line 10
  59.                 echo "    ";
  60.             }
  61.         }
  62.         // line 12
  63.         echo "
  64. ";
  65.         // line 13
  66.         $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));
  67.         // line 14
  68.         $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));
  69.         // line 16
  70.         $context['_parent'] = $context;
  71.         $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); })()));
  72.         $context['loop'] = [
  73.           'parent' => $context['_parent'],
  74.           'index0' => 0,
  75.           'index'  => 1,
  76.           'first'  => true,
  77.         ];
  78.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  79.             $length count($context['_seq']);
  80.             $context['loop']['revindex0'] = $length 1;
  81.             $context['loop']['revindex'] = $length;
  82.             $context['loop']['length'] = $length;
  83.             $context['loop']['last'] = === $length;
  84.         }
  85.         foreach ($context['_seq'] as $context["_key"] => $context["profile"]) {
  86.             // line 17
  87.             $context["lazyLoad"] = (twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse17) == 1);
  88.             // line 18
  89.             $this->loadTemplate("ProfileList/profile.html.twig""ProfileList/list.profiles.html.twig"18)->display(twig_array_merge($context, ["profile" =>             // line 19
  90. $context["profile"], "lazyLoad" =>             // line 20
  91. (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
  92. $context["loop"], "first", [], "any"falsefalsefalse21) && $this->extensions['App\Twig\PaidPlacementsExtension']->isTopPlacement($context["profile"]))]));
  93.             ++$context['loop']['index0'];
  94.             ++$context['loop']['index'];
  95.             $context['loop']['first'] = false;
  96.             if (isset($context['loop']['length'])) {
  97.                 --$context['loop']['revindex0'];
  98.                 --$context['loop']['revindex'];
  99.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  100.             }
  101.         }
  102.         $_parent $context['_parent'];
  103.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['profile'], $context['_parent'], $context['loop']);
  104.         $context array_intersect_key($context$_parent) + $_parent;
  105.         // line 25
  106.         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.'25$this->source); })()), "request", [], "any"falsefalsefalse25), "method", [], "any"falsefalsefalse25) == "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.'25$this->source); })()), "request", [], "any"falsefalsefalse25), "isXmlHttpRequest", [], "method"falsefalsefalse25))) {
  107.             // line 26
  108.             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); })()));
  109.         }
  110.         
  111.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  112.         
  113.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  114.         
  115.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  116.     }
  117.     /**
  118.      * @codeCoverageIgnore
  119.      */
  120.     public function getTemplateName()
  121.     {
  122.         return "ProfileList/list.profiles.html.twig";
  123.     }
  124.     /**
  125.      * @codeCoverageIgnore
  126.      */
  127.     public function isTraitable()
  128.     {
  129.         return false;
  130.     }
  131.     /**
  132.      * @codeCoverageIgnore
  133.      */
  134.     public function getDebugInfo()
  135.     {
  136.         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,);
  137.     }
  138.     public function getSourceContext()
  139.     {
  140.         return new Source("{% set profiles_array = [] %}
  141. {% if profiles != null %}
  142.     {% if profiles.array is defined %}
  143.         {# Legacy listing provider #}
  144.         {% set profiles_array = profiles.array %}
  145.     {% else %}
  146.         {# New listing microservice. Profiles array already contains top placement #}
  147.         {% set profiles_array = profiles %}
  148.     {% endif %}
  149. {% endif %}
  150. {% set hidePreferredButton = hidePreferredButton is defined ? hidePreferredButton : false %}
  151. {% set likeButton = likeButton is defined ? likeButton : false %}
  152. {%- for profile in profiles_array -%}
  153.     {%- set lazyLoad = loop.index == 1 -%}
  154.     {% include 'ProfileList/profile.html.twig' with {
  155.         profile: profile,
  156.         lazyLoad: lazyLoad,
  157.         isProfileTop: (loop.first and profile is top_placement)
  158.     } %}
  159. {%- endfor -%}
  160. {%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
  161. \t{{- porpaginas_render(profiles) -}}
  162. {% endif %}
  163. ""ProfileList/list.profiles.html.twig""/app/templates/ProfileList/list.profiles.html.twig");
  164.     }
  165. }