var/cache/dev/twig/68/682f6d3084764821e2118a402600122b.php line 89

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