var/cache/dev/twig/53/5382c1451429273bd19a1b3ff20791eb79cacc95f009a9173002beefe9b96c63.php line 33

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_a5d56b52cde44167149f352f3abd3e7401c057296409f0869337836a697605b9 extends \Twig\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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Areas/personalized-product-teaser/view.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_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" => "Product""action" => "productTeaser""title" => "Drag a product here""height" => "auto""width" => "100%"]);
  77.                 // line 36
  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 39
  86.             echo "            ";
  87.         } else {
  88.             // line 40
  89.             echo "
  90.                 ";
  91.             // line 41
  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.'41$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 42
  109.                 echo "                    <div class=\"col-md-4 d-flex align-items-stretch flex-column\">
  110.                         ";
  111.                 // line 43
  112.                 $this->loadTemplate("product/product_teaser.html.twig""Areas/personalized-product-teaser/view.html.twig"43)->display(twig_array_merge($context, ["product" => $context["product"]]));
  113.                 // line 44
  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 46
  129.             echo "
  130.             ";
  131.         }
  132.         // line 48
  133.         echo "        </div>
  134.     </div>
  135. </section>";
  136.         
  137.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  138.         
  139.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_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 => 48,  142 => 46,  127 => 44,  125 => 43,  122 => 42,  105 => 41,  102 => 40,  99 => 39,  91 => 36,  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: 'Product',
  179.                                 action: 'productTeaser',
  180.                                 title: 'Drag a product here',
  181.                                 height : 'auto',
  182.                                 width: '100%'
  183.                             })
  184.                         }}
  185.                     </div>
  186.                 {% endfor %}
  187.             {% else %}
  188.                 {% for product in productList %}
  189.                     <div class=\"col-md-4 d-flex align-items-stretch flex-column\">
  190.                         {% include 'product/product_teaser.html.twig' with {'product': product} %}
  191.                     </div>
  192.                 {% endfor %}
  193.             {% endif %}
  194.         </div>
  195.     </div>
  196. </section>""Areas/personalized-product-teaser/view.html.twig""/home/forge/pimcore-demo.code14.dev/app/Resources/views/Areas/personalized-product-teaser/view.html.twig");
  197.     }
  198. }