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

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