var/cache/dev/twig/12/12466d5f1bab9252db790a3b37ecac91.php line 43

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. /* includes/hero-carousel.html.twig */
  14. class __TwigTemplate_28b9aeb9342d4ba974938ea2f4b35694 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""includes/hero-carousel.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""includes/hero-carousel.html.twig"));
  33.         // line 1
  34.         $context["carouselSlides"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select""carouselSlides", ["width" => 70"reload" => true"store" => [=> [=> 1=> 1], => [=> 2=> 2], => [=> 3=> 3], => [=> 4=> 4], => [=> 5=> 5]], "class" => "align-middle"]);
  35.         // line 7
  36.         $context["count"] = twig_get_attribute($this->env$this->source, (isset($context["carouselSlides"]) || array_key_exists("carouselSlides"$context) ? $context["carouselSlides"] : (function () { throw new RuntimeError('Variable "carouselSlides" does not exist.'7$this->source); })()), "getData", [], "method"falsefalsefalse7);
  37.         // line 8
  38.         if ((twig_test_empty((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'8$this->source); })())) || ((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'8$this->source); })()) == 0))) {
  39.             // line 9
  40.             echo "    ";
  41.             $context["count"] = 1;
  42.         }
  43.         // line 11
  44.         echo "<section id=\"heroCarousel\" class=\"carousel slide\" data-ride=\"carousel\" ";
  45.         echo (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'11$this->source); })())) ? ("data-interval=\"false\"") : (""));
  46.         echo ">
  47.     ";
  48.         // line 12
  49.         if (((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'12$this->source); })()) > 1)) {
  50.             // line 13
  51.             echo "        <ol class=\"carousel-indicators\">
  52.             ";
  53.             // line 14
  54.             $context['_parent'] = $context;
  55.             $context['_seq'] = twig_ensure_traversable(range(0, ((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'14$this->source); })()) - 1)));
  56.             foreach ($context['_seq'] as $context["_key"] => $context["j"]) {
  57.                 // line 15
  58.                 echo "                <li data-target=\"#heroCarousel\" data-slide-to=\"";
  59.                 echo twig_escape_filter($this->env$context["j"], "html"nulltrue);
  60.                 echo "\" class=\"";
  61.                 echo ((($context["j"] == 0)) ? ("active") : (""));
  62.                 echo "\"></li>
  63.             ";
  64.             }
  65.             $_parent $context['_parent'];
  66.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['j'], $context['_parent'], $context['loop']);
  67.             $context array_intersect_key($context$_parent) + $_parent;
  68.             // line 17
  69.             echo "        </ol>
  70.     ";
  71.         }
  72.         // line 19
  73.         echo "
  74.     <div class=\"carousel-inner\">
  75.         ";
  76.         // line 21
  77.         $context['_parent'] = $context;
  78.         $context['_seq'] = twig_ensure_traversable(range(0, ((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'21$this->source); })()) - 1)));
  79.         $context['loop'] = [
  80.           'parent' => $context['_parent'],
  81.           'index0' => 0,
  82.           'index'  => 1,
  83.           'first'  => true,
  84.         ];
  85.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  86.             $length count($context['_seq']);
  87.             $context['loop']['revindex0'] = $length 1;
  88.             $context['loop']['revindex'] = $length;
  89.             $context['loop']['length'] = $length;
  90.             $context['loop']['last'] = === $length;
  91.         }
  92.         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  93.             // line 22
  94.             echo "        <div class=\"carousel-item position-relative ";
  95.             echo twig_escape_filter($this->env, ("heroCarousel-" $context["i"]), "html"nulltrue);
  96.             echo " ";
  97.             echo ((twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse22)) ? ("active") : (""));
  98.             echo "\">
  99.             ";
  100.             // line 23
  101.             $context["cImage"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image", ("cImage_" $context["i"]), ["thumbnail" => "portalCarousel""hidetext" => true"title" => "Drag Image Here""imgAttributes" => ["class" => "d-block w-100"], "dropClass" => ("portal-slide-" . (            // line 28
  102. $context["i"] + 1))]);
  103.             // line 30
  104.             echo "
  105.             ";
  106.             // line 31
  107.             echo (isset($context["cImage"]) || array_key_exists("cImage"$context) ? $context["cImage"] : (function () { throw new RuntimeError('Variable "cImage" does not exist.'31$this->source); })());
  108.             echo "
  109.             <div class=\"carousel-caption d-block\">
  110.                 ";
  111.             // line 33
  112.             if (($context["i"] == 0)) {
  113.                 // line 34
  114.                 echo "                    <h1>";
  115.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input", ("cHeadline_" $context["i"]), ["placeholder" => "Headline"]);
  116.                 echo "</h1>
  117.                 ";
  118.             } else {
  119.                 // line 36
  120.                 echo "                    <div class=\"display-1\">";
  121.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input", ("cHeadline_" $context["i"]), ["placeholder" => "Headline"]);
  122.                 echo "</div>
  123.                 ";
  124.             }
  125.             // line 38
  126.             echo "
  127.                 <p class=\"hero-text\">";
  128.             // line 39
  129.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"textarea", ("cText_" $context["i"]), ["placeholder" => "Summary"]);
  130.             echo "</p>
  131.                 <p>";
  132.             // line 40
  133.             $context["cLink"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"link", ("cLink_" $context["i"]), ["class" => "btn btn-lg btn-primary"]);
  134.             // line 43
  135.             echo "                    ";
  136.             echo (isset($context["cLink"]) || array_key_exists("cLink"$context) ? $context["cLink"] : (function () { throw new RuntimeError('Variable "cLink" does not exist.'43$this->source); })());
  137.             echo "
  138.                 </p>
  139.             </div>
  140.         </div>
  141.         ";
  142.             ++$context['loop']['index0'];
  143.             ++$context['loop']['index'];
  144.             $context['loop']['first'] = false;
  145.             if (isset($context['loop']['length'])) {
  146.                 --$context['loop']['revindex0'];
  147.                 --$context['loop']['revindex'];
  148.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  149.             }
  150.         }
  151.         $_parent $context['_parent'];
  152.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  153.         $context array_intersect_key($context$_parent) + $_parent;
  154.         // line 48
  155.         echo "    </div>
  156.     ";
  157.         // line 49
  158.         if (((isset($context["count"]) || array_key_exists("count"$context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.'49$this->source); })()) > 1)) {
  159.             // line 50
  160.             echo "        <a class=\"carousel-control carousel-control-prev\" href=\"#heroCarousel\" role=\"button\" data-slide=\"prev\">
  161.             <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
  162.             <span class=\"sr-only\">Previous</span>
  163.         </a>
  164.         <a class=\"carousel-control carousel-control-next\" href=\"#heroCarousel\" role=\"button\" data-slide=\"next\">
  165.             <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
  166.             <span class=\"sr-only\">Next</span>
  167.         </a>
  168.     ";
  169.         }
  170.         // line 59
  171.         echo "    ";
  172.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'59$this->source); })())) {
  173.             // line 60
  174.             echo "
  175.         <div class=\"container pt-2 pb-5\">
  176.             <span class=\"editmode-label align-middle d-inline-block\">Number of Slides:</span> ";
  177.             // line 62
  178.             echo (isset($context["carouselSlides"]) || array_key_exists("carouselSlides"$context) ? $context["carouselSlides"] : (function () { throw new RuntimeError('Variable "carouselSlides" does not exist.'62$this->source); })());
  179.             echo "
  180.         </div>
  181.     ";
  182.         }
  183.         // line 66
  184.         echo "</section>";
  185.         
  186.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  187.         
  188.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  189.     }
  190.     public function getTemplateName()
  191.     {
  192.         return "includes/hero-carousel.html.twig";
  193.     }
  194.     public function isTraitable()
  195.     {
  196.         return false;
  197.     }
  198.     public function getDebugInfo()
  199.     {
  200.         return array (  194 => 66,  187 => 62,  183 => 60,  180 => 59,  169 => 50,  167 => 49,  164 => 48,  144 => 43,  142 => 40,  138 => 39,  135 => 38,  129 => 36,  123 => 34,  121 => 33,  116 => 31,  113 => 30,  111 => 28,  110 => 23,  103 => 22,  86 => 21,  82 => 19,  78 => 17,  67 => 15,  63 => 14,  60 => 13,  58 => 12,  53 => 11,  49 => 9,  47 => 8,  45 => 7,  43 => 1,);
  201.     }
  202.     public function getSourceContext()
  203.     {
  204.         return new Source("{% set carouselSlides = pimcore_select('carouselSlides', {
  205.     width: 70,
  206.     reload: true,
  207.     store: [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]],
  208.     class: 'align-middle'
  209. }) %}
  210. {% set count = carouselSlides.getData() %}
  211. {% if count is empty or count == 0 %}
  212.     {% set count = 1 %}
  213. {% endif %}
  214. <section id=\"heroCarousel\" class=\"carousel slide\" data-ride=\"carousel\" {{ editmode ? 'data-interval=\"false\"' }}>
  215.     {% if count > 1 %}
  216.         <ol class=\"carousel-indicators\">
  217.             {% for j in 0..(count - 1) %}
  218.                 <li data-target=\"#heroCarousel\" data-slide-to=\"{{ j }}\" class=\"{{ j == 0 ? 'active':'' }}\"></li>
  219.             {% endfor %}
  220.         </ol>
  221.     {% endif %}
  222.     <div class=\"carousel-inner\">
  223.         {% for i in 0..(count - 1) %}
  224.         <div class=\"carousel-item position-relative {{ 'heroCarousel-' ~ i }} {{ loop.first ? 'active' }}\">
  225.             {% set cImage = pimcore_image('cImage_' ~ i, {
  226.                 thumbnail: 'portalCarousel',
  227.                 hidetext: true,
  228.                 title: 'Drag Image Here',
  229.                 imgAttributes: {class: 'd-block w-100'},
  230.                 dropClass: 'portal-slide-' ~ (i + 1)
  231.             }) %}
  232.             {{ cImage|raw }}
  233.             <div class=\"carousel-caption d-block\">
  234.                 {% if(i == 0) %}
  235.                     <h1>{{ pimcore_input('cHeadline_' ~ i,{'placeholder':'Headline'}) }}</h1>
  236.                 {% else %}
  237.                     <div class=\"display-1\">{{ pimcore_input('cHeadline_' ~ i,{'placeholder':'Headline'}) }}</div>
  238.                 {% endif %}
  239.                 <p class=\"hero-text\">{{ pimcore_textarea('cText_' ~ i,{'placeholder':'Summary'}) }}</p>
  240.                 <p>{% set cLink = pimcore_link('cLink_' ~ i, {
  241.                         'class': 'btn btn-lg btn-primary'
  242.                     }) %}
  243.                     {{ cLink|raw }}
  244.                 </p>
  245.             </div>
  246.         </div>
  247.         {% endfor %}
  248.     </div>
  249.     {% if count > 1 %}
  250.         <a class=\"carousel-control carousel-control-prev\" href=\"#heroCarousel\" role=\"button\" data-slide=\"prev\">
  251.             <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>
  252.             <span class=\"sr-only\">Previous</span>
  253.         </a>
  254.         <a class=\"carousel-control carousel-control-next\" href=\"#heroCarousel\" role=\"button\" data-slide=\"next\">
  255.             <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>
  256.             <span class=\"sr-only\">Next</span>
  257.         </a>
  258.     {% endif %}
  259.     {% if editmode %}
  260.         <div class=\"container pt-2 pb-5\">
  261.             <span class=\"editmode-label align-middle d-inline-block\">Number of Slides:</span> {{ carouselSlides|raw }}
  262.         </div>
  263.     {% endif %}
  264. </section>""includes/hero-carousel.html.twig""/var/www/vhosts/pim.musicalstore2005.com/httpdocs/ms05demo/templates/includes/hero-carousel.html.twig");
  265.     }
  266. }