var/cache/dev/twig/b3/b397df228444b5c99977cf0e44aefadd.php line 91

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/personalized-product-teaser/view.html.twig */
  14. class __TwigTemplate_243034c359957575ba897c8d55734c32 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/personalized-product-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/personalized-product-teaser/view.html.twig"));
  35.         // line 1
  36.         echo "<section class=\"teaser-row-container pt-5 pb-3 bg-light text-center\">
  37.     <div class=\"container\">
  38.         <h2>";
  39.         // line 3
  40.         echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""productTeaserTitle", ["placeholder" => "Enter Title"]);
  41.         echo "</h2>
  42.         ";
  43.         // line 6
  44.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'6$this->source); })())) {
  45.             // line 7
  46.             echo "
  47.             <div class=\"alert alert-info\">
  48.                 <div class=\"text-left\">
  49.                     <strong>Teaser with personalized content:</strong>
  50.                     <br/>
  51.                     Content of this teaser will be personalized for visitor if possible. Personalization parameters
  52.                     are <strong>manufactures</strong> and <strong>car classes</strong> of visited car detail pages.
  53.                     <br/>
  54.                     Manually assigned cars are fallback and will be displayed when no personalization is possible.
  55.                 </div>
  56.             </div>
  57.         ";
  58.         }
  59.         // line 21
  60.         echo "
  61.         <div class=\"row mb-3 text-left\">
  62.             ";
  63.         // line 23
  64.         if (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'23$this->source); })()) ||  !(isset($context["usePersonalizedData"]) || array_key_exists("usePersonalizedData"$context) ? $context["usePersonalizedData"] : (function () { throw new RuntimeError('Variable "usePersonalizedData" does not exist.'23$this->source); })()))) {
  65.             // line 24
  66.             echo "                ";
  67.             $context['_parent'] = $context;
  68.             $context['_seq'] = twig_ensure_traversable(range(02));
  69.             foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  70.                 // line 25
  71.                 echo "                    <div class=\"";
  72.                 echo (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'25$this->source); })())) ? ("teaser-col") : ("col-md-4 d-flex align-items-stretch flex-column"));
  73.                 echo "\">
  74.                         ";
  75.                 // line 26
  76.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"renderlet", ("productTeaser" $this->sandbox->ensureToStringAllowed(                // line 27
  77. $context["i"], 27$this->source)), ["type" => "object""editmode" =>                 // line 29
  78. (isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'29$this->source); })()), "controller" => "App\\Controller\\ProductController::productTeaserAction""title" => "Drag a product here""height" => "auto""width" => "100%"]);
  79.                 // line 35
  80.                 echo "
  81.                     </div>
  82.                 ";
  83.             }
  84.             $_parent $context['_parent'];
  85.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  86.             $context array_intersect_key($context$_parent) + $_parent;
  87.             // line 38
  88.             echo "            ";
  89.         } else {
  90.             // line 39
  91.             echo "
  92.                 ";
  93.             // line 40
  94.             $context['_parent'] = $context;
  95.             $context['_seq'] = twig_ensure_traversable((isset($context["productList"]) || array_key_exists("productList"$context) ? $context["productList"] : (function () { throw new RuntimeError('Variable "productList" does not exist.'40$this->source); })()));
  96.             $context['loop'] = [
  97.               'parent' => $context['_parent'],
  98.               'index0' => 0,
  99.               'index'  => 1,
  100.               'first'  => true,
  101.             ];
  102.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  103.                 $length count($context['_seq']);
  104.                 $context['loop']['revindex0'] = $length 1;
  105.                 $context['loop']['revindex'] = $length;
  106.                 $context['loop']['length'] = $length;
  107.                 $context['loop']['last'] = === $length;
  108.             }
  109.             foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
  110.                 // line 41
  111.                 echo "                    <div class=\"col-md-4 d-flex align-items-stretch flex-column\">
  112.                         ";
  113.                 // line 42
  114.                 $this->loadTemplate("product/product_teaser.html.twig""areas/personalized-product-teaser/view.html.twig"42)->display(twig_array_merge($context, ["product" => $context["product"]]));
  115.                 // line 43
  116.                 echo "                    </div>
  117.                 ";
  118.                 ++$context['loop']['index0'];
  119.                 ++$context['loop']['index'];
  120.                 $context['loop']['first'] = false;
  121.                 if (isset($context['loop']['length'])) {
  122.                     --$context['loop']['revindex0'];
  123.                     --$context['loop']['revindex'];
  124.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  125.                 }
  126.             }
  127.             $_parent $context['_parent'];
  128.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
  129.             $context array_intersect_key($context$_parent) + $_parent;
  130.             // line 45
  131.             echo "
  132.             ";
  133.         }
  134.         // line 47
  135.         echo "        </div>
  136.     </div>
  137. </section>";
  138.         
  139.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  140.         
  141.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  142.     }
  143.     /**
  144.      * @codeCoverageIgnore
  145.      */
  146.     public function getTemplateName()
  147.     {
  148.         return "areas/personalized-product-teaser/view.html.twig";
  149.     }
  150.     /**
  151.      * @codeCoverageIgnore
  152.      */
  153.     public function isTraitable()
  154.     {
  155.         return false;
  156.     }
  157.     /**
  158.      * @codeCoverageIgnore
  159.      */
  160.     public function getDebugInfo()
  161.     {
  162.         return array (  148 => 47,  144 => 45,  129 => 43,  127 => 42,  124 => 41,  107 => 40,  104 => 39,  101 => 38,  93 => 35,  91 => 29,  90 => 27,  89 => 26,  84 => 25,  79 => 24,  77 => 23,  73 => 21,  57 => 7,  55 => 6,  49 => 3,  45 => 1,);
  163.     }
  164.     public function getSourceContext()
  165.     {
  166.         return new Source("<section class=\"teaser-row-container pt-5 pb-3 bg-light text-center\">
  167.     <div class=\"container\">
  168.         <h2>{{ pimcore_input('productTeaserTitle', {'placeholder':'Enter Title'}) }}</h2>
  169.         {% if editmode %}
  170.             <div class=\"alert alert-info\">
  171.                 <div class=\"text-left\">
  172.                     <strong>Teaser with personalized content:</strong>
  173.                     <br/>
  174.                     Content of this teaser will be personalized for visitor if possible. Personalization parameters
  175.                     are <strong>manufactures</strong> and <strong>car classes</strong> of visited car detail pages.
  176.                     <br/>
  177.                     Manually assigned cars are fallback and will be displayed when no personalization is possible.
  178.                 </div>
  179.             </div>
  180.         {% endif %}
  181.         <div class=\"row mb-3 text-left\">
  182.             {% if editmode or not usePersonalizedData %}
  183.                 {% for i in 0..2 %}
  184.                     <div class=\"{{ editmode ? 'teaser-col' : 'col-md-4 d-flex align-items-stretch flex-column' }}\">
  185.                         {{
  186.                             pimcore_renderlet(('productTeaser'~i), {
  187.                                 type: 'object',
  188.                                 editmode: editmode,
  189.                                 controller: 'App\\\\Controller\\\\ProductController::productTeaserAction',
  190.                                 title: 'Drag a product here',
  191.                                 height : 'auto',
  192.                                 width: '100%'
  193.                             })
  194.                         }}
  195.                     </div>
  196.                 {% endfor %}
  197.             {% else %}
  198.                 {% for product in productList %}
  199.                     <div class=\"col-md-4 d-flex align-items-stretch flex-column\">
  200.                         {% include 'product/product_teaser.html.twig' with {'product': product} %}
  201.                     </div>
  202.                 {% endfor %}
  203.             {% endif %}
  204.         </div>
  205.     </div>
  206. </section>""areas/personalized-product-teaser/view.html.twig""/var/www/dev-10/templates/areas/personalized-product-teaser/view.html.twig");
  207.     }
  208.     
  209.     public function checkSecurity()
  210.     {
  211.         static $tags = array("if" => 6"for" => 24"include" => 42);
  212.         static $filters = array();
  213.         static $functions = array("pimcore_input" => 3"range" => 24"pimcore_renderlet" => 27);
  214.         try {
  215.             $this->sandbox->checkSecurity(
  216.                 ['if''for''include'],
  217.                 [],
  218.                 ['pimcore_input''range''pimcore_renderlet']
  219.             );
  220.         } catch (SecurityError $e) {
  221.             $e->setSourceContext($this->source);
  222.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  223.                 $e->setTemplateLine($tags[$e->getTagName()]);
  224.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  225.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  226.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  227.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  228.             }
  229.             throw $e;
  230.         }
  231.     }
  232. }