var/cache/dev/twig/34/34beda1a8bd5be6bd44399007994c655210cf992ca65b89aee1dab9a0bcbb69d.php line 45

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* product/single.html.twig */
  16. class __TwigTemplate_8583491127f6493ae941c6b2f1948efc5092dc82a71f2fe653324c5065ed2645 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'content' => [$this'block_content'],
  29.         ];
  30.         $this->sandbox $this->extensions[SandboxExtension::class];
  31.         $this->checkSecurity();
  32.     }
  33.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  34.     {
  35.         // line 1
  36.         return "app/layout.html.twig";
  37.     }
  38.     protected function doDisplay(array $context, array $blocks = []): iterable
  39.     {
  40.         $macros $this->macros;
  41.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""product/single.html.twig"));
  43.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""product/single.html.twig"));
  45.         $this->parent $this->loadTemplate("app/layout.html.twig""product/single.html.twig"1);
  46.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  47.         
  48.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  49.         
  50.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  51.     }
  52.     // line 3
  53.     /**
  54.      * @return iterable<null|scalar|\Stringable>
  55.      */
  56.     public function block_content(array $context, array $blocks = []): iterable
  57.     {
  58.         $macros $this->macros;
  59.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  60.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  61.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  62.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  63.         // line 4
  64.         yield "
  65.     ";
  66.         // line 5
  67.         yield from $this->loadTemplate("product/partials/editmode/_options.html.twig""product/single.html.twig"5)->unwrap()->yield($context);
  68.         // line 6
  69.         yield "
  70.     ";
  71.         // line 7
  72.         yield from $this->loadTemplate("app/partials/navigation/_breadcrumbs.html.twig""product/single.html.twig"7)->unwrap()->yield($context);
  73.         // line 8
  74.         yield "
  75.     ";
  76.         // line 10
  77.         yield "    ";
  78.         yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"area""content-brick-2", ["type" => "content-brick""params" => ["content-brick" => ["product" => $this->sandbox->ensureToStringAllowed(        // line 14
  79. (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'14$this->source); })()), 14$this->source), "forceH1" => true"defaultLayout" => "text-image""defaultBackgroundColor" => "bg-blue-200""defaultInverted" => true"defaultTitle" => (((((CoreExtension::getAttribute($this->env$this->source,         // line 19
  80. ($context["product"] ?? null), "title", [], "any"truetruetrue19) &&  !(null === CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "title", [], "any"falsefalsetrue19)))) ? (CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "title", [], "any"falsefalsetrue19)) : (null))) ? ((((CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "title", [], "any"truetruetrue19) &&  !(null === CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "title", [], "any"falsefalsetrue19)))) ? (CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "title", [], "any"falsefalsetrue19)) : (null))) : (((("<span class=\"text-blue\">" . (((CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "name", [], "any"truetruetrue19) &&  !(null === CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "name", [], "any"falsefalsetrue19)))) ? (CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "name", [], "any"falsefalsetrue19)) : (""))) . "</span> ") . (((CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "code", [], "any"truetruetrue19) &&  !(null === CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "code", [], "any"falsefalsetrue19)))) ? (CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "code", [], "any"falsefalsetrue19)) : (""))))), "defaultWysiwyg" => (((CoreExtension::getAttribute($this->env$this->source,         // line 20
  81. ($context["product"] ?? null), "description", [], "any"truetruetrue20) &&  !(null === CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "description", [], "any"falsefalsetrue20)))) ? (CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "description", [], "any"falsefalsetrue20)) : (null)), "defaultGalleryItems" => (((CoreExtension::getAttribute($this->env$this->source,         // line 21
  82. ($context["product"] ?? null), "images", [], "any"truetruetrue21) &&  !(null === CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "images", [], "any"falsefalsetrue21)))) ? (CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "images", [], "any"falsefalsetrue21)) : ([])), "overrideImage" => (((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source,         // line 22
  83. ($context["product"] ?? null), "images", [], "any"falsetruetrue22), "items", [], "any"falsetruetrue22), 0, [], "array"truetruetrue22) &&  !(null === CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "images", [], "any"falsetruetrue22), "items", [], "any"falsetruetrue22), 0, [], "array"falsefalsetrue22)))) ? (CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "images", [], "any"falsetruetrue22), "items", [], "any"falsetruetrue22), 0, [], "array"falsefalsetrue22)) : (null)), "showFloatingBanner" => true]]]);
  84.         // line 26
  85.         yield "
  86.     ";
  87.         // line 28
  88.         yield from $this->loadTemplate("product/partials/_product-specifications.html.twig""product/single.html.twig"28)->unwrap()->yield($context);
  89.         // line 29
  90.         yield "
  91.     ";
  92.         // line 31
  93.         yield "
  94.     ";
  95.         // line 33
  96.         yield "    ";
  97.         // line 34
  98.         yield "
  99.     ";
  100.         // line 36
  101.         yield "
  102.     ";
  103.         // line 37
  104.         yield $this->env->getFunction('pimcore_inc')->getCallable()($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'37$this->source); })()), "getProperty", ["productCtaSnippet"], "method"falsefalsetrue37), 37$this->source));
  105.         yield "
  106.     ";
  107.         // line 39
  108.         yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"area""product-table-1", ["type" => "product-table-brick""params" => ["product-table-brick" => ["defaultTitle" => $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Alternatieven voor {{ productName }}", ["{{ productName }}" => (((" <span class=\"text-blue\">" . (((CoreExtension::getAttribute($this->env$this->source,         // line 44
  109. ($context["product"] ?? null), "name", [], "any"truetruetrue44) &&  !(null === CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "name", [], "any"falsefalsetrue44)))) ? (CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "name", [], "any"falsefalsetrue44)) : ("?"))) . "</span> ") . (((CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "code", [], "any"truetruetrue44) &&  !(null === CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "code", [], "any"falsefalsetrue44)))) ? (CoreExtension::getAttribute($this->env$this->source, ($context["product"] ?? null), "code", [], "any"falsefalsetrue44)) : ("?")))])]]]);
  110.         // line 48
  111.         yield "
  112.     ";
  113.         // line 51
  114.         yield "    ";
  115.         yield $this->env->getFunction('pimcore_inc')->getCallable()($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'51$this->source); })()), "getProperty", ["faqSnippet"], "method"falsefalsetrue51), 51$this->source));
  116.         yield "
  117.     ";
  118.         // line 58
  119.         yield "
  120.     ";
  121.         // line 59
  122.         yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"areablock""afterContentAreaBlock", ["allowed" => ["faq-brick"], "group" => (        // line 61
  123. $context["brickGroups"] ?? []), "params" => (        // line 62
  124. $context["areaBrickParams"] ?? [])]);
  125.         // line 63
  126.         yield "
  127. ";
  128.         
  129.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  130.         
  131.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  132.         yield from [];
  133.     }
  134.     /**
  135.      * @codeCoverageIgnore
  136.      */
  137.     public function getTemplateName(): string
  138.     {
  139.         return "product/single.html.twig";
  140.     }
  141.     /**
  142.      * @codeCoverageIgnore
  143.      */
  144.     public function isTraitable(): bool
  145.     {
  146.         return false;
  147.     }
  148.     /**
  149.      * @codeCoverageIgnore
  150.      */
  151.     public function getDebugInfo(): array
  152.     {
  153.         return array (  144 => 63,  142 => 62,  141 => 61,  140 => 59,  137 => 58,  131 => 51,  127 => 48,  125 => 44,  124 => 39,  119 => 37,  116 => 36,  113 => 34,  111 => 33,  108 => 31,  105 => 29,  103 => 28,  99 => 26,  97 => 22,  96 => 21,  95 => 20,  94 => 19,  93 => 14,  91 => 10,  88 => 8,  86 => 7,  83 => 6,  81 => 5,  78 => 4,  65 => 3,  42 => 1,);
  154.     }
  155.     public function getSourceContext(): Source
  156.     {
  157.         return new Source("{% extends 'app/layout.html.twig' %}
  158. {% block content %}
  159.     {% include 'product/partials/editmode/_options.html.twig' %}
  160.     {% include \"app/partials/navigation/_breadcrumbs.html.twig\" %}
  161.     {# TODO use `defaultTitle: product.parent.getEditable('content-brick-2.title')` oid ? #}
  162.     {{ pimcore_area('content-brick-2', {
  163.         'type':'content-brick',
  164.         'params':{
  165.             'content-brick': {
  166.                 'product': product,
  167.                 'forceH1' : true,
  168.                 'defaultLayout': 'text-image',
  169.                 'defaultBackgroundColor':'bg-blue-200',
  170.                 'defaultInverted': true,
  171.                 'defaultTitle' : (product.title ?? null) ?: \"<span class=\\\"text-blue\\\">#{product.name ?? ''}</span> #{product.code ?? ''}\",
  172.                 \"defaultWysiwyg\" : product.description ?? null,
  173.                 \"defaultGalleryItems\" : product.images ?? [],
  174.                 \"overrideImage\" : product.images.items[0] ?? null,
  175.                 'showFloatingBanner': true,
  176.             }
  177.         }
  178.     }) }}
  179.     {% include 'product/partials/_product-specifications.html.twig' %}
  180.     {# {% include 'product/partials/_standard-parts.html.twig' %} #}
  181.     {# Temporarily disabled because the current products have linked accessories to 'Old' products. #}
  182.     {# {% include 'product/partials/_standard-accessoires.html.twig' %} #}
  183.     {# {% include 'product/partials/_optional-accessoires.html.twig' %} #}
  184.     {{ pimcore_inc(document.getProperty('productCtaSnippet')) }}
  185.     {{ pimcore_area('product-table-1', {
  186.         'type':'product-table-brick',
  187.         'params': {
  188.             'product-table-brick': {
  189.                 'defaultTitle': \"Alternatieven voor {{ productName }}\" | trans({
  190.                     '{{ productName }}': \" <span class=\\\"text-blue\\\">#{ product.name ?? '?' }</span> #{ product.code ?? '?' }\"
  191.                 })
  192.             }
  193.         }
  194.     }) }}
  195.     {# @BACKEND TODO: Get FAQ questions out of product.  #}
  196.     {{ pimcore_inc(document.getProperty('faqSnippet')) }}
  197.     {#
  198.     {{ pimcore_area('contact-side-widget', {
  199.         type: 'contact-side-widget-brick'
  200.     }) }}
  201.     #}
  202.     {{ pimcore_areablock('afterContentAreaBlock', {
  203.         \"allowed\": ['faq-brick'],
  204.         \"group\" : brickGroups ?? [],
  205.         'params': areaBrickParams ?? []
  206.     } ) }}
  207. {% endblock %}
  208. ""product/single.html.twig""/home/forge/testing.coolworld.ptchr.dev/templates/product/single.html.twig");
  209.     }
  210.     
  211.     public function checkSecurity()
  212.     {
  213.         static $tags = ["extends" => 1"include" => 5];
  214.         static $filters = ["trans" => 43];
  215.         static $functions = ["pimcore_area" => 10"pimcore_inc" => 37"pimcore_areablock" => 59];
  216.         try {
  217.             $this->sandbox->checkSecurity(
  218.                 ['extends''include'],
  219.                 ['trans'],
  220.                 ['pimcore_area''pimcore_inc''pimcore_areablock'],
  221.                 $this->source
  222.             );
  223.         } catch (SecurityError $e) {
  224.             $e->setSourceContext($this->source);
  225.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  226.                 $e->setTemplateLine($tags[$e->getTagName()]);
  227.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  228.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  229.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  230.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  231.             }
  232.             throw $e;
  233.         }
  234.     }
  235. }