var/cache/dev/twig/13/1321886afb4476f6e6bfa7cf7e430b13.php line 36

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