var/cache/dev/twig/15/15ee52c3917c1593ae63a5224cde798c.php line 104

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/carousel/view.html.twig */
  14. class __TwigTemplate_33ac0a25b5c98b3c5681ba4637762d50 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.             'css' => [$this'block_css'],
  25.         ];
  26.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  27.         $this->checkSecurity();
  28.     }
  29.     protected function doDisplay(array $context, array $blocks = [])
  30.     {
  31.         $macros $this->macros;
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  33.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/carousel/view.html.twig"));
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  35.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/carousel/view.html.twig"));
  36.         // line 1
  37.         $context["randomId"] = ("swiper_" twig_random($this->env));
  38.         // line 2
  39.         echo "
  40. ";
  41.         // line 3
  42.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'3$this->source); })())) {
  43.             // line 4
  44.             echo "    <div class=\"container\">
  45.         ";
  46.             // line 5
  47.             $context['_parent'] = $context;
  48.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""carouselblock"), "iterator", [], "any"falsefalsetrue5));
  49.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  50.                 // line 6
  51.                 echo "            <div style=\"background: #fff; padding: 20px;\">
  52.                 <p>Link:<br>";
  53.                 // line 7
  54.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"link""link", ["required" => "linkonly"]);
  55.                 // line 9
  56.                 echo "</p>
  57.                 <p>Kép (1920x1200px):<br>";
  58.                 // line 10
  59.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image");
  60.                 echo "</p>
  61.                 <h2>";
  62.                 // line 11
  63.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""subline", ["placeholder" => "Szöveg 1. sor"]);
  64.                 echo "</h2>
  65.                 <h1>";
  66.                 // line 12
  67.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"textarea""headerline", ["placeholder" => "Szöveg 2. sor"]);
  68.                 echo "</h1>
  69.                 <hr>
  70.             </div>
  71.         ";
  72.             }
  73.             $_parent $context['_parent'];
  74.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  75.             $context array_intersect_key($context$_parent) + $_parent;
  76.             // line 16
  77.             echo "    </div>
  78. ";
  79.         } else {
  80.             // line 18
  81.             echo "    <section id=\"homepage-slider\" class=\"position-relative\">
  82.         <div class=\"container\">
  83.             <div class=\"swiper-container homepage-slider ";
  84.             // line 20
  85.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId"$context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.'20$this->source); })()), 20$this->source), "html"nulltrue);
  86.             echo "\">
  87.                 <div class=\"swiper-wrapper\">
  88.                     ";
  89.             // line 22
  90.             $context['_parent'] = $context;
  91.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"block""carouselblock"), "iterator", [], "any"falsefalsetrue22));
  92.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  93.                 // line 23
  94.                 echo "                        <a href=\"";
  95.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"link""link"), "getHref", [], "method"falsefalsetrue23), 23$this->source), "html"nulltrue);
  96.                 echo "\" class=\"swiper-slide bg\"
  97.                            style=\"background: url('";
  98.                 // line 24
  99.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image""image"), "getSrc", [], "method"falsefalsetrue24), 24$this->source), "html"nulltrue);
  100.                 echo "')\">
  101.                             <div class=\"content\">
  102.                                 <div>
  103.                                     ";
  104.                 // line 27
  105.                 if ( !twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""subline"), "isEmpty", [], "method"falsefalsetrue27)) {
  106.                     // line 28
  107.                     echo "                                        <p>";
  108.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""subline"), "getData", [], "method"falsefalsetrue28), 28$this->source), "html"nulltrue);
  109.                     echo "</p>
  110.                                     ";
  111.                 }
  112.                 // line 30
  113.                 echo "                                    ";
  114.                 if ( !twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"textarea""headerline"), "isEmpty", [], "method"falsefalsetrue30)) {
  115.                     // line 31
  116.                     echo "                                        <h2>";
  117.                     echo twig_nl2br(twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"textarea""headerline"), "getData", [], "method"falsefalsetrue31), 31$this->source), "html"nulltrue));
  118.                     echo "</h2>
  119.                                     ";
  120.                 }
  121.                 // line 33
  122.                 echo "                                </div>
  123.                             </div>
  124.                         </a>
  125.                     ";
  126.             }
  127.             $_parent $context['_parent'];
  128.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  129.             $context array_intersect_key($context$_parent) + $_parent;
  130.             // line 37
  131.             echo "                </div>
  132.                 <div class=\"swiper-pagination\"></div>
  133.                 <div class=\"swiper-button-prev\"></div>
  134.                 <div class=\"swiper-button-next\"></div>
  135.             </div>
  136.         </div>
  137.     </section>
  138.     ";
  139.             // line 45
  140.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", ["https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"], "method"falsefalsetrue45);
  141.             // line 46
  142.             echo "
  143.     ";
  144.             // line 47
  145.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_script')->getCallable()(), "captureStart", ["APPEND"], "method"falsefalsetrue47);
  146.             // line 48
  147.             echo "        const swiper_";
  148.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId"$context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.'48$this->source); })()), 48$this->source), "html"nulltrue);
  149.             echo " = new Swiper('.";
  150.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId"$context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.'48$this->source); })()), 48$this->source), "html"nulltrue);
  151.             echo "', {
  152.         // Optional parameters
  153.         direction: 'horizontal',
  154.         loop: true,
  155.         slidesPerView: 1,
  156.         autoplay: {
  157.             delay: 3000,
  158.         },
  159.         // If we need pagination
  160.         pagination: {
  161.         el: '.";
  162.             // line 59
  163.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId"$context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.'59$this->source); })()), 59$this->source), "html"nulltrue);
  164.             echo " .swiper-pagination',
  165.         },
  166.         // Navigation arrows
  167.         navigation: {
  168.         nextEl: '.";
  169.             // line 64
  170.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId"$context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.'64$this->source); })()), 64$this->source), "html"nulltrue);
  171.             echo " .swiper-button-next',
  172.         prevEl: '.";
  173.             // line 65
  174.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId"$context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.'65$this->source); })()), 65$this->source), "html"nulltrue);
  175.             echo " .swiper-button-prev',
  176.         },
  177.         });
  178.     ";
  179.             // line 68
  180.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_script')->getCallable()(), "captureEnd", [], "method"falsefalsetrue68);
  181.             // line 69
  182.             echo "
  183.     ";
  184.             // line 70
  185.             $this->displayBlock('css'$context$blocks);
  186.         }
  187.         
  188.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  189.         
  190.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  191.     }
  192.     public function block_css($context, array $blocks = [])
  193.     {
  194.         $macros $this->macros;
  195.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  196.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""css"));
  197.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  198.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""css"));
  199.         // line 71
  200.         echo "        ";
  201.         twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_link')->getCallable()(), "appendStylesheet", ["https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css"], "method"falsefalsetrue71);
  202.         // line 72
  203.         echo "    ";
  204.         
  205.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  206.         
  207.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  208.     }
  209.     public function getTemplateName()
  210.     {
  211.         return "areas/carousel/view.html.twig";
  212.     }
  213.     public function isTraitable()
  214.     {
  215.         return false;
  216.     }
  217.     public function getDebugInfo()
  218.     {
  219.         return array (  220 => 72,  217 => 71,  197 => 70,  194 => 69,  192 => 68,  186 => 65,  182 => 64,  174 => 59,  157 => 48,  155 => 47,  152 => 46,  150 => 45,  140 => 37,  131 => 33,  125 => 31,  122 => 30,  116 => 28,  114 => 27,  108 => 24,  103 => 23,  99 => 22,  94 => 20,  90 => 18,  86 => 16,  76 => 12,  72 => 11,  68 => 10,  65 => 9,  63 => 7,  60 => 6,  56 => 5,  53 => 4,  51 => 3,  48 => 2,  46 => 1,);
  220.     }
  221.     public function getSourceContext()
  222.     {
  223.         return new Source("{% set randomId = 'swiper_' ~ random() %}
  224. {% if editmode %}
  225.     <div class=\"container\">
  226.         {% for i in pimcore_block('carouselblock').iterator %}
  227.             <div style=\"background: #fff; padding: 20px;\">
  228.                 <p>Link:<br>{{ pimcore_link('link', {
  229.                         'required': 'linkonly'
  230.                     }) }}</p>
  231.                 <p>Kép (1920x1200px):<br>{{ pimcore_image('image') }}</p>
  232.                 <h2>{{ pimcore_input('subline', {'placeholder': 'Szöveg 1. sor'}) }}</h2>
  233.                 <h1>{{ pimcore_textarea('headerline', {'placeholder': 'Szöveg 2. sor'}) }}</h1>
  234.                 <hr>
  235.             </div>
  236.         {% endfor %}
  237.     </div>
  238. {% else %}
  239.     <section id=\"homepage-slider\" class=\"position-relative\">
  240.         <div class=\"container\">
  241.             <div class=\"swiper-container homepage-slider {{ randomId }}\">
  242.                 <div class=\"swiper-wrapper\">
  243.                     {% for i in pimcore_block('carouselblock').iterator %}
  244.                         <a href=\"{{ pimcore_link('link').getHref() }}\" class=\"swiper-slide bg\"
  245.                            style=\"background: url('{{ pimcore_image('image').getSrc() }}')\">
  246.                             <div class=\"content\">
  247.                                 <div>
  248.                                     {% if not pimcore_input('subline').isEmpty() %}
  249.                                         <p>{{ pimcore_input('subline').getData() }}</p>
  250.                                     {% endif %}
  251.                                     {% if not pimcore_textarea('headerline').isEmpty() %}
  252.                                         <h2>{{ pimcore_textarea('headerline').getData() | nl2br }}</h2>
  253.                                     {% endif %}
  254.                                 </div>
  255.                             </div>
  256.                         </a>
  257.                     {% endfor %}
  258.                 </div>
  259.                 <div class=\"swiper-pagination\"></div>
  260.                 <div class=\"swiper-button-prev\"></div>
  261.                 <div class=\"swiper-button-next\"></div>
  262.             </div>
  263.         </div>
  264.     </section>
  265.     {% do pimcore_head_script().appendFile('https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js') %}
  266.     {% do pimcore_head_script().captureStart('APPEND') %}
  267.         const swiper_{{ randomId }} = new Swiper('.{{ randomId }}', {
  268.         // Optional parameters
  269.         direction: 'horizontal',
  270.         loop: true,
  271.         slidesPerView: 1,
  272.         autoplay: {
  273.             delay: 3000,
  274.         },
  275.         // If we need pagination
  276.         pagination: {
  277.         el: '.{{ randomId }} .swiper-pagination',
  278.         },
  279.         // Navigation arrows
  280.         navigation: {
  281.         nextEl: '.{{ randomId }} .swiper-button-next',
  282.         prevEl: '.{{ randomId }} .swiper-button-prev',
  283.         },
  284.         });
  285.     {% do pimcore_head_script().captureEnd() %}
  286.     {% block css %}
  287.         {% do pimcore_head_link().appendStylesheet('https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css') %}
  288.     {% endblock %}
  289. {% endif %}""areas/carousel/view.html.twig""/home/zoltan/public_html/boutique-v2/templates/areas/carousel/view.html.twig");
  290.     }
  291.     
  292.     public function checkSecurity()
  293.     {
  294.         static $tags = array("set" => 1"if" => 3"for" => 5"do" => 45"block" => 70);
  295.         static $filters = array("escape" => 20"nl2br" => 31);
  296.         static $functions = array("random" => 1"pimcore_block" => 5"pimcore_link" => 7"pimcore_image" => 10"pimcore_input" => 11"pimcore_textarea" => 12"pimcore_head_script" => 45"pimcore_head_link" => 71);
  297.         try {
  298.             $this->sandbox->checkSecurity(
  299.                 ['set''if''for''do''block'],
  300.                 ['escape''nl2br'],
  301.                 ['random''pimcore_block''pimcore_link''pimcore_image''pimcore_input''pimcore_textarea''pimcore_head_script''pimcore_head_link']
  302.             );
  303.         } catch (SecurityError $e) {
  304.             $e->setSourceContext($this->source);
  305.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  306.                 $e->setTemplateLine($tags[$e->getTagName()]);
  307.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  308.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  309.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  310.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  311.             }
  312.             throw $e;
  313.         }
  314.     }
  315. }