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

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