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.                 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.'7$this->source); })())))) {
  53.                     // line 8
  54.                     echo "            ";
  55.                     $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.'8$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.'8$this->source); })()));
  56.                     // line 9
  57.                     echo "        ";
  58.                 }
  59.                 // line 10
  60.                 echo "    ";
  61.             } else {
  62.                 // line 11
  63.                 echo "        ";
  64.                 // line 12
  65.                 echo "        ";
  66.                 $context["profiles_array"] = (isset($context["profiles"]) || array_key_exists("profiles"$context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.'12$this->source); })());
  67.                 // line 13
  68.                 echo "    ";
  69.             }
  70.         }
  71.         // line 15
  72.         echo "
  73. ";
  74.         // line 16
  75.         $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.'16$this->source); })())) : (false));
  76.         // line 17
  77.         $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.'17$this->source); })())) : (false));
  78.         // line 19
  79.         $context['_parent'] = $context;
  80.         $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.'19$this->source); })()));
  81.         $context['loop'] = [
  82.           'parent' => $context['_parent'],
  83.           'index0' => 0,
  84.           'index'  => 1,
  85.           'first'  => true,
  86.         ];
  87.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  88.             $length count($context['_seq']);
  89.             $context['loop']['revindex0'] = $length 1;
  90.             $context['loop']['revindex'] = $length;
  91.             $context['loop']['length'] = $length;
  92.             $context['loop']['last'] = === $length;
  93.         }
  94.         foreach ($context['_seq'] as $context["_key"] => $context["profile"]) {
  95.             // line 20
  96.             $context["lazyLoad"] = (twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse20) == 1);
  97.             // line 21
  98.             $this->loadTemplate("ProfileList/profile.html.twig""ProfileList/list.profiles.html.twig"21)->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.'21$this->source); })())]));
  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 24
  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.'24$this->source); })()), "request", [], "any"falsefalsefalse24), "method", [], "any"falsefalsefalse24) == "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.'24$this->source); })()), "request", [], "any"falsefalsefalse24), "isXmlHttpRequest", [], "method"falsefalsefalse24))) {
  113.             // line 25
  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.'25$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 => 25,  122 => 24,  108 => 21,  106 => 20,  89 => 19,  87 => 17,  85 => 16,  82 => 15,  78 => 13,  75 => 12,  73 => 11,  70 => 10,  67 => 9,  64 => 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. {% if profiles != null %}
  148.     {% if profiles.array is defined %}
  149.         {# Legacy listing provider #}
  150.         {% set profiles_array = profiles.array %}
  151.         {% if top_profile is defined and null != top_profile %}
  152.             {% set profiles_array = [top_profile]|merge(profiles_array) %}
  153.         {% endif %}
  154.     {% else %}
  155.         {# New listing microservice. Profiles array already contains top placement #}
  156.         {% set profiles_array = profiles %}
  157.     {% endif %}
  158. {% endif %}
  159. {% set hidePreferredButton = hidePreferredButton is defined ? hidePreferredButton : false %}
  160. {% set likeButton = likeButton is defined ? likeButton : false %}
  161. {%- for profile in profiles_array -%}
  162.     {%- set lazyLoad = loop.index == 1 -%}
  163.     {% include 'ProfileList/profile.html.twig' with {profile: profile, lazyLoad: lazyLoad} %}
  164. {%- endfor -%}
  165. {%- if app.request.method == 'GET' and app.request.isXmlHttpRequest() -%}
  166. \t{{- porpaginas_render(profiles) -}}
  167. {% endif %}
  168. ""ProfileList/list.profiles.html.twig""/app/templates/ProfileList/list.profiles.html.twig");
  169.     }
  170. }