var/cache/dev/twig/4c/4c29ba998382013fa94a02c36464813d.php line 33

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/gallery-carousel/view.html.twig */
  14. class __TwigTemplate_7d8c3c89d0db5f4b89f76918d9f1be7e 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_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/gallery-carousel/view.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""areas/gallery-carousel/view.html.twig"));
  33.         // line 1
  34.         echo "<section class=\"area-gallery-carousel\">
  35.     ";
  36.         // line 2
  37.         $context["selectStore"] = [];
  38.         // line 3
  39.         echo "    ";
  40.         $context['_parent'] = $context;
  41.         $context['_seq'] = twig_ensure_traversable(range(229));
  42.         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  43.             // line 4
  44.             echo "        ";
  45.             $context["selectStore"] = twig_array_merge((isset($context["selectStore"]) || array_key_exists("selectStore"$context) ? $context["selectStore"] : (function () { throw new RuntimeError('Variable "selectStore" does not exist.'4$this->source); })()), [=> $context["i"]]);
  46.             // line 5
  47.             echo "    ";
  48.         }
  49.         $_parent $context['_parent'];
  50.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  51.         $context array_intersect_key($context$_parent) + $_parent;
  52.         // line 6
  53.         echo "
  54.     ";
  55.         // line 7
  56.         $context["slidesSelect"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select""slides", ["store" =>         // line 8
  57. (isset($context["selectStore"]) || array_key_exists("selectStore"$context) ? $context["selectStore"] : (function () { throw new RuntimeError('Variable "selectStore" does not exist.'8$this->source); })()), "reload" => true"width" => 70"class" => "align-middle"]);
  58.         // line 13
  59.         echo "
  60.     ";
  61.         // line 14
  62.         $context["showPreviewsCheckbox"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"checkbox""showPreviews", ["class" => "align-middle pt-7px"]);
  63.         // line 15
  64.         echo "    ";
  65.         $context["showPreviews"] = (twig_get_attribute($this->env$this->source, (isset($context["showPreviewsCheckbox"]) || array_key_exists("showPreviewsCheckbox"$context) ? $context["showPreviewsCheckbox"] : (function () { throw new RuntimeError('Variable "showPreviewsCheckbox" does not exist.'15$this->source); })()), "isChecked", [], "any"falsefalsefalse15) &&  !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'15$this->source); })()));
  66.         // line 16
  67.         echo "
  68.     ";
  69.         // line 17
  70.         $context["id"] = ("gallery-carousel-" $this->env->getFunction('uniqid')->getCallable()());
  71.         // line 18
  72.         echo "    ";
  73.         $context["slides"] = ((twig_get_attribute($this->env$this->source, ($context["slidesSelect"] ?? null), "getData", [], "method"truetruefalse18)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["slidesSelect"] ?? null), "getData", [], "method"falsefalsefalse18), 2)) : (2));
  74.         // line 19
  75.         echo "
  76.     ";
  77.         // line 20
  78.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'20$this->source); })())) {
  79.             // line 21
  80.             echo "
  81.         <div class=\"alert alert-secondary col-xs-12\" style=\"height: 75px\">
  82.             <div class=\"col-xs-6 d-inline mx-auto\">
  83.                 <span class=\"editmode-label align-middle\">How many images you want to show?</span>
  84.                 ";
  85.             // line 25
  86.             echo (isset($context["slidesSelect"]) || array_key_exists("slidesSelect"$context) ? $context["slidesSelect"] : (function () { throw new RuntimeError('Variable "slidesSelect" does not exist.'25$this->source); })());
  87.             echo "
  88.             </div>
  89.             <div class=\"col-xs-6 d-inline ml-5\">
  90.                 <span class=\"editmode-label align-middle\">Show Previews</span>
  91.                 ";
  92.             // line 29
  93.             echo (isset($context["showPreviewsCheckbox"]) || array_key_exists("showPreviewsCheckbox"$context) ? $context["showPreviewsCheckbox"] : (function () { throw new RuntimeError('Variable "showPreviewsCheckbox" does not exist.'29$this->source); })());
  94.             echo "
  95.             </div>
  96.         </div>
  97.     ";
  98.         }
  99.         // line 34
  100.         echo "
  101.     <div id=\"";
  102.         // line 35
  103.         echo twig_escape_filter($this->env, (isset($context["id"]) || array_key_exists("id"$context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.'35$this->source); })()), "html"nulltrue);
  104.         echo "\" class=\"gallery carousel slide\" data-ride=\"carousel\"  ";
  105.         echo (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'35$this->source); })())) ? ("data-interval=\"false\"") : (""));
  106.         echo ">
  107.         <!-- Indicators -->
  108.         <ol class=\"carousel-indicators ";
  109.         // line 37
  110.         echo (((isset($context["showPreviews"]) || array_key_exists("showPreviews"$context) ? $context["showPreviews"] : (function () { throw new RuntimeError('Variable "showPreviews" does not exist.'37$this->source); })())) ? ("preview visible-lg") : (""));
  111.         echo "\">
  112.             ";
  113.         // line 39
  114.         $context['_parent'] = $context;
  115.         $context['_seq'] = twig_ensure_traversable(range(0, ((isset($context["slides"]) || array_key_exists("slides"$context) ? $context["slides"] : (function () { throw new RuntimeError('Variable "slides" does not exist.'39$this->source); })()) - 1)));
  116.         $context['loop'] = [
  117.           'parent' => $context['_parent'],
  118.           'index0' => 0,
  119.           'index'  => 1,
  120.           'first'  => true,
  121.         ];
  122.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  123.             $length count($context['_seq']);
  124.             $context['loop']['revindex0'] = $length 1;
  125.             $context['loop']['revindex'] = $length;
  126.             $context['loop']['length'] = $length;
  127.             $context['loop']['last'] = === $length;
  128.         }
  129.         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  130.             // line 40
  131.             echo "
  132.                 <li data-target=\"#";
  133.             // line 41
  134.             echo twig_escape_filter($this->env, (isset($context["id"]) || array_key_exists("id"$context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.'41$this->source); })()), "html"nulltrue);
  135.             echo "\" data-slide-to=\"";
  136.             echo twig_escape_filter($this->env$context["i"], "html"nulltrue);
  137.             echo "\" class=\"";
  138.             echo ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse41)) ? ("active") : (""));
  139.             echo "\">
  140.                     ";
  141.             // line 42
  142.             if ((isset($context["showPreviews"]) || array_key_exists("showPreviews"$context) ? $context["showPreviews"] : (function () { throw new RuntimeError('Variable "showPreviews" does not exist.'42$this->source); })())) {
  143.                 // line 43
  144.                 echo "                        ";
  145.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image", ("image_" .                 // line 44
  146. $context["i"]), ["thumbnail" => "galleryCarouselPreview"]);
  147.                 // line 47
  148.                 echo "
  149.                     ";
  150.             }
  151.             // line 49
  152.             echo "                </li>
  153.             ";
  154.             ++$context['loop']['index0'];
  155.             ++$context['loop']['index'];
  156.             $context['loop']['first'] = false;
  157.             if (isset($context['loop']['length'])) {
  158.                 --$context['loop']['revindex0'];
  159.                 --$context['loop']['revindex'];
  160.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  161.             }
  162.         }
  163.         $_parent $context['_parent'];
  164.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  165.         $context array_intersect_key($context$_parent) + $_parent;
  166.         // line 52
  167.         echo "        </ol>
  168.         <div class=\"carousel-inner\">
  169.             ";
  170.         // line 55
  171.         $context['_parent'] = $context;
  172.         $context['_seq'] = twig_ensure_traversable(range(0, ((isset($context["slides"]) || array_key_exists("slides"$context) ? $context["slides"] : (function () { throw new RuntimeError('Variable "slides" does not exist.'55$this->source); })()) - 1)));
  173.         $context['loop'] = [
  174.           'parent' => $context['_parent'],
  175.           'index0' => 0,
  176.           'index'  => 1,
  177.           'first'  => true,
  178.         ];
  179.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  180.             $length count($context['_seq']);
  181.             $context['loop']['revindex0'] = $length 1;
  182.             $context['loop']['revindex'] = $length;
  183.             $context['loop']['length'] = $length;
  184.             $context['loop']['last'] = === $length;
  185.         }
  186.         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  187.             // line 56
  188.             echo "                <div class=\"carousel-item ";
  189.             echo twig_escape_filter($this->env, (((isset($context["id"]) || array_key_exists("id"$context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.'56$this->source); })()) . "-") . $context["i"]), "html"nulltrue);
  190.             echo " ";
  191.             echo ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse56)) ? ("active") : (""));
  192.             echo "\">
  193.                     ";
  194.             // line 57
  195.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image", ("image_" .             // line 58
  196. $context["i"]), ["thumbnail" => "galleryCarousel""hidetext" => true"dropClass" => ((            // line 61
  197. (isset($context["id"]) || array_key_exists("id"$context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.'61$this->source); })()) . "-") . $context["i"]), "imgAttributes" => ["class" => "d-block w-100"]]);
  198.             // line 64
  199.             echo "
  200.                     <div class=\"carousel-caption text-center ";
  201.             // line 66
  202.             echo (((isset($context["showPreviews"]) || array_key_exists("showPreviews"$context) ? $context["showPreviews"] : (function () { throw new RuntimeError('Variable "showPreviews" does not exist.'66$this->source); })())) ? ("vh-10") : (""));
  203.             echo "\">
  204.                         <h3>";
  205.             // line 67
  206.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input", ("caption-title_" $context["i"]));
  207.             echo "</h3>
  208.                         <p class=\"hero-text\">";
  209.             // line 68
  210.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"textarea", ("caption-text" $context["i"]));
  211.             echo "</p>
  212.                         <p>";
  213.             // line 69
  214.             $context["cLink"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"link", ("caption-link" $context["i"]), ["class" => "btn btn-lg btn-primary"]);
  215.             // line 72
  216.             echo "                            ";
  217.             echo (isset($context["cLink"]) || array_key_exists("cLink"$context) ? $context["cLink"] : (function () { throw new RuntimeError('Variable "cLink" does not exist.'72$this->source); })());
  218.             echo "
  219.                         </p>
  220.                     </div>
  221.                 </div>
  222.             ";
  223.             ++$context['loop']['index0'];
  224.             ++$context['loop']['index'];
  225.             $context['loop']['first'] = false;
  226.             if (isset($context['loop']['length'])) {
  227.                 --$context['loop']['revindex0'];
  228.                 --$context['loop']['revindex'];
  229.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  230.             }
  231.         }
  232.         $_parent $context['_parent'];
  233.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  234.         $context array_intersect_key($context$_parent) + $_parent;
  235.         // line 77
  236.         echo "        </div>
  237.         <a class=\"carousel-control carousel-control-prev\" href=\"#";
  238.         // line 79
  239.         echo twig_escape_filter($this->env, (isset($context["id"]) || array_key_exists("id"$context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.'79$this->source); })()), "html"nulltrue);
  240.         echo "\" role=\"button\" data-slide=\"prev\">
  241.             <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
  242.             <span class=\"sr-only\">Previous</span>
  243.         </a>
  244.         <a class=\"carousel-control carousel-control-next\" href=\"#";
  245.         // line 83
  246.         echo twig_escape_filter($this->env, (isset($context["id"]) || array_key_exists("id"$context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.'83$this->source); })()), "html"nulltrue);
  247.         echo "\" role=\"button\" data-slide=\"next\">
  248.             <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
  249.             <span class=\"sr-only\">Next</span>
  250.         </a>
  251.     </div>
  252. </section>
  253. ";
  254.         
  255.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  256.         
  257.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  258.     }
  259.     public function getTemplateName()
  260.     {
  261.         return "areas/gallery-carousel/view.html.twig";
  262.     }
  263.     public function isTraitable()
  264.     {
  265.         return false;
  266.     }
  267.     public function getDebugInfo()
  268.     {
  269.         return array (  261 => 83,  254 => 79,  250 => 77,  230 => 72,  228 => 69,  224 => 68,  220 => 67,  216 => 66,  212 => 64,  210 => 61,  209 => 58,  208 => 57,  201 => 56,  184 => 55,  179 => 52,  163 => 49,  159 => 47,  157 => 44,  155 => 43,  153 => 42,  145 => 41,  142 => 40,  125 => 39,  120 => 37,  113 => 35,  110 => 34,  102 => 29,  95 => 25,  89 => 21,  87 => 20,  84 => 19,  81 => 18,  79 => 17,  76 => 16,  73 => 15,  71 => 14,  68 => 13,  66 => 8,  65 => 7,  62 => 6,  56 => 5,  53 => 4,  48 => 3,  46 => 2,  43 => 1,);
  270.     }
  271.     public function getSourceContext()
  272.     {
  273.         return new Source("<section class=\"area-gallery-carousel\">
  274.     {% set selectStore = [] %}
  275.     {% for i in 2..29 %}
  276.         {% set selectStore = selectStore|merge([i]) %}
  277.     {% endfor %}
  278.     {% set slidesSelect = pimcore_select('slides', {
  279.         store: selectStore,
  280.         reload: true,
  281.         width: 70,
  282.         class: 'align-middle'
  283.     }) %}
  284.     {% set showPreviewsCheckbox = pimcore_checkbox('showPreviews', {class: 'align-middle pt-7px'}) %}
  285.     {% set showPreviews = showPreviewsCheckbox.isChecked and not editmode %}
  286.     {% set id = 'gallery-carousel-' ~ uniqid() %}
  287.     {% set slides = slidesSelect.getData()|default(2) %}
  288.     {% if editmode %}
  289.         <div class=\"alert alert-secondary col-xs-12\" style=\"height: 75px\">
  290.             <div class=\"col-xs-6 d-inline mx-auto\">
  291.                 <span class=\"editmode-label align-middle\">How many images you want to show?</span>
  292.                 {{ slidesSelect|raw }}
  293.             </div>
  294.             <div class=\"col-xs-6 d-inline ml-5\">
  295.                 <span class=\"editmode-label align-middle\">Show Previews</span>
  296.                 {{ showPreviewsCheckbox|raw }}
  297.             </div>
  298.         </div>
  299.     {% endif %}
  300.     <div id=\"{{ id }}\" class=\"gallery carousel slide\" data-ride=\"carousel\"  {{ editmode ? 'data-interval=\"false\"' : '' }}>
  301.         <!-- Indicators -->
  302.         <ol class=\"carousel-indicators {{ showPreviews ? 'preview visible-lg' }}\">
  303.             {% for i in 0..(slides-1) %}
  304.                 <li data-target=\"#{{ id }}\" data-slide-to=\"{{ i }}\" class=\"{{ loop.first ? 'active' }}\">
  305.                     {% if showPreviews %}
  306.                         {{
  307.                             pimcore_image('image_' ~ i, {
  308.                                 thumbnail: 'galleryCarouselPreview',
  309.                             })
  310.                         }}
  311.                     {% endif %}
  312.                 </li>
  313.             {% endfor %}
  314.         </ol>
  315.         <div class=\"carousel-inner\">
  316.             {% for i in 0..(slides-1) %}
  317.                 <div class=\"carousel-item {{ id ~ '-' ~ i }} {{ loop.first ? 'active' }}\">
  318.                     {{
  319.                         pimcore_image('image_' ~ i, {
  320.                             thumbnail: 'galleryCarousel',
  321.                             hidetext: true,
  322.                             dropClass: id ~ '-' ~ i,
  323.                             imgAttributes: {class: 'd-block w-100'}
  324.                         })
  325.                     }}
  326.                     <div class=\"carousel-caption text-center {{ showPreviews ? 'vh-10' : ''}}\">
  327.                         <h3>{{ pimcore_input('caption-title_' ~ i) }}</h3>
  328.                         <p class=\"hero-text\">{{ pimcore_textarea('caption-text' ~ i) }}</p>
  329.                         <p>{% set cLink = pimcore_link('caption-link' ~ i, {
  330.                                 'class': 'btn btn-lg btn-primary'
  331.                             }) %}
  332.                             {{ cLink|raw }}
  333.                         </p>
  334.                     </div>
  335.                 </div>
  336.             {% endfor %}
  337.         </div>
  338.         <a class=\"carousel-control carousel-control-prev\" href=\"#{{ id }}\" role=\"button\" data-slide=\"prev\">
  339.             <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
  340.             <span class=\"sr-only\">Previous</span>
  341.         </a>
  342.         <a class=\"carousel-control carousel-control-next\" href=\"#{{ id }}\" role=\"button\" data-slide=\"next\">
  343.             <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
  344.             <span class=\"sr-only\">Next</span>
  345.         </a>
  346.     </div>
  347. </section>
  348. ""areas/gallery-carousel/view.html.twig""/var/www/vhosts/pim.musicalstore2005.com/httpdocs/ms05demo/templates/areas/gallery-carousel/view.html.twig");
  349.     }
  350. }