var/cache/dev/twig/0d/0d92a38a1126bade9091216c739b7dad.php line 35

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