var/cache/dev/twig/47/47f879b0b5644e1d7dee096bf060f658.php line 103

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/standard-teaser/view.html.twig */
  14. class __TwigTemplate_27fe318435b8893ef794c11a3e2bf3a9 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""areas/standard-teaser/view.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""areas/standard-teaser/view.html.twig"));
  35.         // line 1
  36.         echo "<section class=\"area-standard-teaser bg-light text-center\">
  37.     <div class=\"container\">
  38.         <h2>";
  39.         // line 3
  40.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""standardTeaserHeading");
  41.         echo "</h2>
  42.         <div class=\"card-deck mb-3 text-center ";
  43.         // line 4
  44.         echo (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'4$this->source); })())) ? ("no-gutters") : (""));
  45.         echo " \">
  46.             ";
  47.         // line 5
  48.         $context['_parent'] = $context;
  49.         $context['_seq'] = twig_ensure_traversable(range(02));
  50.         $context['loop'] = [
  51.           'parent' => $context['_parent'],
  52.           'index0' => 0,
  53.           'index'  => 1,
  54.           'first'  => true,
  55.         ];
  56.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  57.             $length count($context['_seq']);
  58.             $context['loop']['revindex0'] = $length 1;
  59.             $context['loop']['revindex'] = $length;
  60.             $context['loop']['length'] = $length;
  61.             $context['loop']['last'] = === $length;
  62.         }
  63.         foreach ($context['_seq'] as $context["_key"] => $context["t"]) {
  64.             // line 6
  65.             echo "                ";
  66.             // line 7
  67.             $context["select"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select", ("type_" $this->sandbox->ensureToStringAllowed($context["t"], 7$this->source)), ["width" => 110"reload" => true"store" => [["direct""direct"], ["snippet""snippet"], ["news""news"]], "class" => "align-middle"]);
  68.             // line 18
  69.             echo "
  70.                 ";
  71.             // line 19
  72.             if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'19$this->source); })())) {
  73.                 // line 20
  74.                 echo "                    <div class=\"col-md-4\">
  75.                         <div class=\"mb-3\">
  76.                             <span class=\"editmode-label align-middle\">Type:</span>
  77.                             ";
  78.                 // line 23
  79.                 echo $this->sandbox->ensureToStringAllowed((isset($context["select"]) || array_key_exists("select"$context) ? $context["select"] : (function () { throw new RuntimeError('Variable "select" does not exist.'23$this->source); })()), 23$this->source);
  80.                 echo "
  81.                         </div>
  82.                 ";
  83.             }
  84.             // line 26
  85.             echo "
  86.                 ";
  87.             // line 27
  88.             $context["type"] = twig_get_attribute($this->env$this->source, (isset($context["select"]) || array_key_exists("select"$context) ? $context["select"] : (function () { throw new RuntimeError('Variable "select" does not exist.'27$this->source); })()), "getData", [], "method"falsefalsetrue27);
  89.             // line 28
  90.             echo "                ";
  91.             if (((isset($context["type"]) || array_key_exists("type"$context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.'28$this->source); })()) == "direct")) {
  92.                 // line 29
  93.                 echo "                    ";
  94.                 echo twig_include($this->env$context"snippets/standard-teaser.html.twig", ["suffix" => (                // line 31
  95. $context["t"] + 1)]);
  96.                 // line 33
  97.                 echo "
  98.                 ";
  99.             } elseif ((            // line 34
  100. (isset($context["type"]) || array_key_exists("type"$context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.'34$this->source); })()) == "news")) {
  101.                 // line 35
  102.                 echo "                    ";
  103.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"renderlet", ("newsteaser_" $this->sandbox->ensureToStringAllowed(                // line 36
  104. $context["t"], 36$this->source)), ["type" => "object""editmode" =>                 // line 38
  105. (isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'38$this->source); })()), "controller" => "App\\Controller\\NewsController::newsTeaserAction""title" => "Drag a news object here""height" => "auto""width" => "100%"]);
  106.                 // line 44
  107.                 echo "
  108.                 ";
  109.             } else {
  110.                 // line 46
  111.                 echo "                    ";
  112.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"snippet", ("teaser_" $this->sandbox->ensureToStringAllowed($context["t"], 46$this->source)));
  113.                 echo "
  114.                 ";
  115.             }
  116.             // line 48
  117.             echo "
  118.                 ";
  119.             // line 49
  120.             if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'49$this->source); })())) {
  121.                 // line 50
  122.                 echo "                    </div>
  123.                 ";
  124.             }
  125.             // line 52
  126.             echo "
  127.             ";
  128.             ++$context['loop']['index0'];
  129.             ++$context['loop']['index'];
  130.             $context['loop']['first'] = false;
  131.             if (isset($context['loop']['length'])) {
  132.                 --$context['loop']['revindex0'];
  133.                 --$context['loop']['revindex'];
  134.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  135.             }
  136.         }
  137.         $_parent $context['_parent'];
  138.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['t'], $context['_parent'], $context['loop']);
  139.         $context array_intersect_key($context$_parent) + $_parent;
  140.         // line 55
  141.         echo "        </div>
  142.     </div>
  143. </section>
  144. ";
  145.         
  146.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  147.         
  148.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  149.     }
  150.     /**
  151.      * @codeCoverageIgnore
  152.      */
  153.     public function getTemplateName()
  154.     {
  155.         return "areas/standard-teaser/view.html.twig";
  156.     }
  157.     /**
  158.      * @codeCoverageIgnore
  159.      */
  160.     public function isTraitable()
  161.     {
  162.         return false;
  163.     }
  164.     /**
  165.      * @codeCoverageIgnore
  166.      */
  167.     public function getDebugInfo()
  168.     {
  169.         return array (  151 => 55,  135 => 52,  131 => 50,  129 => 49,  126 => 48,  120 => 46,  116 => 44,  114 => 38,  113 => 36,  111 => 35,  109 => 34,  106 => 33,  104 => 31,  102 => 29,  99 => 28,  97 => 27,  94 => 26,  88 => 23,  83 => 20,  81 => 19,  78 => 18,  76 => 7,  74 => 6,  57 => 5,  53 => 4,  49 => 3,  45 => 1,);
  170.     }
  171.     public function getSourceContext()
  172.     {
  173.         return new Source("<section class=\"area-standard-teaser bg-light text-center\">
  174.     <div class=\"container\">
  175.         <h2>{{ pimcore_input('standardTeaserHeading') }}</h2>
  176.         <div class=\"card-deck mb-3 text-center {{ editmode ? 'no-gutters' : '' }} \">
  177.             {% for t in 0..2 %}
  178.                 {%
  179.                     set select = pimcore_select('type_' ~ t, {
  180.                         width: 110,
  181.                         reload: true,
  182.                         store: [
  183.                             ['direct','direct'],
  184.                             ['snippet','snippet'],
  185.                             ['news','news']
  186.                         ],
  187.                         class: 'align-middle'
  188.                     })
  189.                 %}
  190.                 {% if editmode %}
  191.                     <div class=\"col-md-4\">
  192.                         <div class=\"mb-3\">
  193.                             <span class=\"editmode-label align-middle\">Type:</span>
  194.                             {{ select|raw }}
  195.                         </div>
  196.                 {% endif %}
  197.                 {% set type = select.getData() %}
  198.                 {% if type == \"direct\" %}
  199.                     {{
  200.                         include('snippets/standard-teaser.html.twig', {
  201.                             suffix: (t+1)
  202.                         })
  203.                     }}
  204.                 {% elseif type == \"news\" %}
  205.                     {{
  206.                         pimcore_renderlet('newsteaser_' ~ t, {
  207.                             type: 'object',
  208.                             editmode: editmode,
  209.                             controller: 'App\\\\Controller\\\\NewsController::newsTeaserAction',
  210.                             title: 'Drag a news object here',
  211.                             height : 'auto',
  212.                             width: '100%'
  213.                         })
  214.                     }}
  215.                 {% else %}
  216.                     {{ pimcore_snippet('teaser_' ~ t) }}
  217.                 {% endif %}
  218.                 {% if editmode %}
  219.                     </div>
  220.                 {% endif %}
  221.             {% endfor %}
  222.         </div>
  223.     </div>
  224. </section>
  225. ""areas/standard-teaser/view.html.twig""/var/www/dev-10/templates/areas/standard-teaser/view.html.twig");
  226.     }
  227.     
  228.     public function checkSecurity()
  229.     {
  230.         static $tags = array("for" => 5"set" => 7"if" => 19);
  231.         static $filters = array("raw" => 23);
  232.         static $functions = array("pimcore_input" => 3"range" => 5"pimcore_select" => 7"include" => 30"pimcore_renderlet" => 36"pimcore_snippet" => 46);
  233.         try {
  234.             $this->sandbox->checkSecurity(
  235.                 ['for''set''if'],
  236.                 ['raw'],
  237.                 ['pimcore_input''range''pimcore_select''include''pimcore_renderlet''pimcore_snippet']
  238.             );
  239.         } catch (SecurityError $e) {
  240.             $e->setSourceContext($this->source);
  241.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  242.                 $e->setTemplateLine($tags[$e->getTagName()]);
  243.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  244.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  245.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  246.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  247.             }
  248.             throw $e;
  249.         }
  250.     }
  251. }