var/cache/dev/twig/ee/ee04e32c82c95f86f4773d169ae8cfea.php line 208

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. /* areas/popular-watches/view.html.twig */
  14. class __TwigTemplate_8fd1e9fd5cf3441899f0292c27c71cdc 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.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/popular-watches/view.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""areas/popular-watches/view.html.twig"));
  35.         // line 1
  36.         echo "<div class=\"similar-products\">
  37.     <div class=\"row\">
  38.         <div class=\"col-12 text-center\">
  39.             ";
  40.         // line 4
  41.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'4$this->source); })())) {
  42.             // line 5
  43.             echo "                ";
  44.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""popular-title", ["placeholder" => "A legnépszerűbb *MODELL* órák""class" => "article-edit-title"]);
  45.             // line 8
  46.             echo "
  47.             ";
  48.         } elseif ((        // line 9
  49. array_key_exists("productList"$context) && (twig_length_filter($this->env, (isset($context["productList"]) || array_key_exists("productList"$context) ? $context["productList"] : (function () { throw new RuntimeError('Variable "productList" does not exist.'9$this->source); })())) > 0))) {
  50.             // line 10
  51.             echo "                ";
  52.             $context["popularTitle"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""popular-title");
  53.             // line 11
  54.             echo "                ";
  55.             if (((isset($context["popularTitle"]) || array_key_exists("popularTitle"$context) ? $context["popularTitle"] : (function () { throw new RuntimeError('Variable "popularTitle" does not exist.'11$this->source); })()) && twig_get_attribute($this->env$this->source, (isset($context["popularTitle"]) || array_key_exists("popularTitle"$context) ? $context["popularTitle"] : (function () { throw new RuntimeError('Variable "popularTitle" does not exist.'11$this->source); })()), "getText", [], "method"falsefalsetrue11))) {
  56.                 // line 12
  57.                 echo "                    <h3>";
  58.                 echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["popularTitle"]) || array_key_exists("popularTitle"$context) ? $context["popularTitle"] : (function () { throw new RuntimeError('Variable "popularTitle" does not exist.'12$this->source); })()), "render", [], "method"falsefalsetrue12), 12$this->source);
  59.                 echo "</h3>
  60.                 ";
  61.             } else {
  62.                 // line 14
  63.                 echo "                    <h3>A legnépszerűbb órák ebben a kategóriában</h3>
  64.                 ";
  65.             }
  66.             // line 16
  67.             echo "            ";
  68.         }
  69.         // line 17
  70.         echo "        </div>
  71.     </div>
  72.     ";
  73.         // line 19
  74.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'19$this->source); })())) {
  75.             // line 20
  76.             echo "        ";
  77.             $context["options"] = ["types" => ["object"], "subtypes" => ["object" => ["object"]], "classes" => ["CoreShopProduct"], "reload" => true];
  78.             // line 28
  79.             echo "        ";
  80.             $context["block"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""popularwatchesblock", ["reload" => true"limit" => 20]);
  81.             // line 32
  82.             echo "        ";
  83.             $context['_parent'] = $context;
  84.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["block"]) || array_key_exists("block"$context) ? $context["block"] : (function () { throw new RuntimeError('Variable "block" does not exist.'32$this->source); })()), "iterator", [], "any"falsefalsetrue32));
  85.             $context['loop'] = [
  86.               'parent' => $context['_parent'],
  87.               'index0' => 0,
  88.               'index'  => 1,
  89.               'first'  => true,
  90.             ];
  91.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  92.                 $length count($context['_seq']);
  93.                 $context['loop']['revindex0'] = $length 1;
  94.                 $context['loop']['revindex'] = $length;
  95.                 $context['loop']['length'] = $length;
  96.                 $context['loop']['last'] = === $length;
  97.             }
  98.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  99.                 // line 33
  100.                 echo "            <div class=\"popular-watch-index\">
  101.                 ";
  102.                 // line 34
  103.                 $context["index"] = twig_get_attribute($this->env$this->source, (isset($context["block"]) || array_key_exists("block"$context) ? $context["block"] : (function () { throw new RuntimeError('Variable "block" does not exist.'34$this->source); })()), "current", [], "any"falsefalsetrue34);
  104.                 // line 35
  105.                 echo "                ";
  106.                 $context["product"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"relation""product"$this->sandbox->ensureToStringAllowed((isset($context["options"]) || array_key_exists("options"$context) ? $context["options"] : (function () { throw new RuntimeError('Variable "options" does not exist.'35$this->source); })()), 35$this->source));
  107.                 // line 36
  108.                 echo "                Termék ";
  109.                 echo twig_escape_filter($this->env, ((isset($context["index"]) || array_key_exists("index"$context) ? $context["index"] : (function () { throw new RuntimeError('Variable "index" does not exist.'36$this->source); })()) + 1), "html"nulltrue);
  110.                 echo ":
  111.                 ";
  112.                 // line 37
  113.                 echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'37$this->source); })()), "render", [], "method"falsefalsetrue37), 37$this->source);
  114.                 echo "
  115.                 ";
  116.                 // line 38
  117.                 if ((((isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'38$this->source); })()) && twig_get_attribute($this->env$this->source, ($context["product"] ?? null), "element", [], "any"truetruetrue38)) && twig_get_attribute($this->env$this->source, (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'38$this->source); })()), "element", [], "any"falsefalsetrue38))) {
  118.                     // line 39
  119.                     echo "                    <div class=\"row\">
  120.                         ";
  121.                     // line 40
  122.                     echo twig_include($this->env$context"@CoreShopFrontend/Product/_product_item.html.twig", ["product" => twig_get_attribute($this->env$this->source,                     // line 41
  123. (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'41$this->source); })()), "element", [], "any"falsefalsetrue41)]);
  124.                     // line 42
  125.                     echo "
  126.                     </div>
  127.                 ";
  128.                 }
  129.                 // line 45
  130.                 echo "            </div>
  131.         ";
  132.                 ++$context['loop']['index0'];
  133.                 ++$context['loop']['index'];
  134.                 $context['loop']['first'] = false;
  135.                 if (isset($context['loop']['length'])) {
  136.                     --$context['loop']['revindex0'];
  137.                     --$context['loop']['revindex'];
  138.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  139.                 }
  140.             }
  141.             $_parent $context['_parent'];
  142.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  143.             $context array_intersect_key($context$_parent) + $_parent;
  144.             // line 47
  145.             echo "    ";
  146.         } else {
  147.             // line 48
  148.             echo "        <div class=\"row\">
  149.             ";
  150.             // line 49
  151.             if ((array_key_exists("productList"$context) && (twig_length_filter($this->env, (isset($context["productList"]) || array_key_exists("productList"$context) ? $context["productList"] : (function () { throw new RuntimeError('Variable "productList" does not exist.'49$this->source); })())) > 0))) {
  152.                 // line 50
  153.                 echo "                ";
  154.                 $context['_parent'] = $context;
  155.                 $context['_seq'] = twig_ensure_traversable((isset($context["productList"]) || array_key_exists("productList"$context) ? $context["productList"] : (function () { throw new RuntimeError('Variable "productList" does not exist.'50$this->source); })()));
  156.                 $context['loop'] = [
  157.                   'parent' => $context['_parent'],
  158.                   'index0' => 0,
  159.                   'index'  => 1,
  160.                   'first'  => true,
  161.                 ];
  162.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  163.                     $length count($context['_seq']);
  164.                     $context['loop']['revindex0'] = $length 1;
  165.                     $context['loop']['revindex'] = $length;
  166.                     $context['loop']['length'] = $length;
  167.                     $context['loop']['last'] = === $length;
  168.                 }
  169.                 foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  170.                     // line 51
  171.                     echo "                    ";
  172.                     echo twig_include($this->env$context"@CoreShopFrontend/Product/_product_item.html.twig", ["product" => $context["item"]]);
  173.                     echo "
  174.                 ";
  175.                     ++$context['loop']['index0'];
  176.                     ++$context['loop']['index'];
  177.                     $context['loop']['first'] = false;
  178.                     if (isset($context['loop']['length'])) {
  179.                         --$context['loop']['revindex0'];
  180.                         --$context['loop']['revindex'];
  181.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  182.                     }
  183.                 }
  184.                 $_parent $context['_parent'];
  185.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  186.                 $context array_intersect_key($context$_parent) + $_parent;
  187.                 // line 53
  188.                 echo "            ";
  189.             }
  190.             // line 54
  191.             echo "        </div>
  192.     ";
  193.         }
  194.         // line 56
  195.         echo "
  196.     <div class=\"text-center\">
  197.         ";
  198.         // line 58
  199.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"link""more", ["class" => "btn btn-primary"]);
  200.         // line 60
  201.         echo "
  202.     </div>
  203. </div>";
  204.         
  205.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  206.         
  207.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  208.     }
  209.     public function getTemplateName()
  210.     {
  211.         return "areas/popular-watches/view.html.twig";
  212.     }
  213.     public function isTraitable()
  214.     {
  215.         return false;
  216.     }
  217.     public function getDebugInfo()
  218.     {
  219.         return array (  210 => 60,  208 => 58,  204 => 56,  200 => 54,  197 => 53,  180 => 51,  162 => 50,  160 => 49,  157 => 48,  154 => 47,  139 => 45,  134 => 42,  132 => 41,  131 => 40,  128 => 39,  126 => 38,  122 => 37,  117 => 36,  114 => 35,  112 => 34,  109 => 33,  91 => 32,  88 => 28,  85 => 20,  83 => 19,  79 => 17,  76 => 16,  72 => 14,  66 => 12,  63 => 11,  60 => 10,  58 => 9,  55 => 8,  52 => 5,  50 => 4,  45 => 1,);
  220.     }
  221.     public function getSourceContext()
  222.     {
  223.         return new Source("<div class=\"similar-products\">
  224.     <div class=\"row\">
  225.         <div class=\"col-12 text-center\">
  226.             {% if editmode %}
  227.                 {{ pimcore_input('popular-title', {
  228.                     'placeholder': 'A legnépszerűbb *MODELL* órák',
  229.                     'class': 'article-edit-title'
  230.                 }) }}
  231.             {% elseif productList is defined and productList|length>0 %}
  232.                 {% set popularTitle = pimcore_input('popular-title') %}
  233.                 {% if popularTitle and popularTitle.getText() %}
  234.                     <h3>{{ popularTitle.render() | raw }}</h3>
  235.                 {% else %}
  236.                     <h3>A legnépszerűbb órák ebben a kategóriában</h3>
  237.                 {% endif %}
  238.             {% endif %}
  239.         </div>
  240.     </div>
  241.     {% if editmode %}
  242.         {% set options = {
  243.             \"types\": [\"object\"],
  244.             \"subtypes\": {
  245.                 \"object\": [\"object\"]
  246.             },
  247.             \"classes\": [\"CoreShopProduct\"],
  248.             \"reload\": true
  249.         } %}
  250.         {% set block = pimcore_block('popularwatchesblock', {
  251.             'reload': true,
  252.             'limit': 20,
  253.         }) %}
  254.         {% for i in block.iterator %}
  255.             <div class=\"popular-watch-index\">
  256.                 {% set index = block.current %}
  257.                 {% set product = pimcore_relation('product', options) %}
  258.                 Termék {{ index + 1 }}:
  259.                 {{ product.render() | raw }}
  260.                 {% if product and product.element is defined and product.element %}
  261.                     <div class=\"row\">
  262.                         {{ include('@CoreShopFrontend/Product/_product_item.html.twig', {
  263.                             'product': product.element
  264.                         }) }}
  265.                     </div>
  266.                 {% endif %}
  267.             </div>
  268.         {% endfor %}
  269.     {% else %}
  270.         <div class=\"row\">
  271.             {% if productList is defined and productList|length>0 %}
  272.                 {% for item in productList %}
  273.                     {{ include('@CoreShopFrontend/Product/_product_item.html.twig', {'product': item}) }}
  274.                 {% endfor %}
  275.             {% endif %}
  276.         </div>
  277.     {% endif %}
  278.     <div class=\"text-center\">
  279.         {{ pimcore_link('more', {
  280.             'class': 'btn btn-primary'
  281.         }) }}
  282.     </div>
  283. </div>""areas/popular-watches/view.html.twig""/home/zoltan/public_html/boutique-v2/templates/areas/popular-watches/view.html.twig");
  284.     }
  285.     
  286.     public function checkSecurity()
  287.     {
  288.         static $tags = array("if" => 4"set" => 10"for" => 32);
  289.         static $filters = array("length" => 9"raw" => 12"escape" => 36);
  290.         static $functions = array("pimcore_input" => 5"pimcore_block" => 28"pimcore_relation" => 35"include" => 40"pimcore_link" => 58);
  291.         try {
  292.             $this->sandbox->checkSecurity(
  293.                 ['if''set''for'],
  294.                 ['length''raw''escape'],
  295.                 ['pimcore_input''pimcore_block''pimcore_relation''include''pimcore_link']
  296.             );
  297.         } catch (SecurityError $e) {
  298.             $e->setSourceContext($this->source);
  299.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  300.                 $e->setTemplateLine($tags[$e->getTagName()]);
  301.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  302.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  303.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  304.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  305.             }
  306.             throw $e;
  307.         }
  308.     }
  309. }