var/cache/dev/twig/f6/f6a897185239a45e11b27adc52f78d7f.php line 53

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. /* @BitBagSyliusCmsPlugin/Shop/Page/show.html.twig */
  14. class __TwigTemplate_fb8c7beac547ddff37e4c75353efac6e 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->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'metatags' => [$this'block_metatags'],
  25.             'content' => [$this'block_content'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "@SyliusShop/layout.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"));
  40.         // line 3
  41.         $context["published"] = (( !(null === twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'3$this->source); })()), "publishAt", [], "any"falsefalsefalse3)) && (twig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'3$this->source); })()), "publishAt", [], "any"falsefalsefalse3), "Y-m-d H:i:s") < twig_date_format_filter($this->env"now""Y-m-d H:i:s"))) || (null === twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'3$this->source); })()), "publishAt", [], "any"falsefalsefalse3)));
  42.         // line 1
  43.         $this->parent $this->loadTemplate("@SyliusShop/layout.html.twig""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"1);
  44.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 5
  51.     public function block_title($context, array $blocks = [])
  52.     {
  53.         $macros $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  58.         // line 6
  59.         if (( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'6$this->source); })()), "title", [], "any"falsefalsefalse6)) && ((isset($context["published"]) || array_key_exists("published"$context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.'6$this->source); })()) == true))) {
  60.             // line 7
  61.             echo "        ";
  62.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'7$this->source); })()), "title", [], "any"falsefalsefalse7), "html"nulltrue);
  63.             echo "
  64.     ";
  65.         } else {
  66.             // line 9
  67.             echo "        ";
  68.             $this->displayParentBlock("title"$context$blocks);
  69.             echo "
  70.     ";
  71.         }
  72.         
  73.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  74.         
  75.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  76.     }
  77.     // line 13
  78.     public function block_metatags($context, array $blocks = [])
  79.     {
  80.         $macros $this->macros;
  81.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  82.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metatags"));
  83.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  84.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metatags"));
  85.         // line 14
  86.         echo "    ";
  87.         if (((isset($context["published"]) || array_key_exists("published"$context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.'14$this->source); })()) == true)) {
  88.             // line 15
  89.             echo "        ";
  90.             if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'15$this->source); })()), "metaKeywords", [], "any"falsefalsefalse15))) {
  91.                 // line 16
  92.                 echo "            <meta name=\"keywords\" content=\"";
  93.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'16$this->source); })()), "metaKeywords", [], "any"falsefalsefalse16), "html"nulltrue);
  94.                 echo "\"/>
  95.         ";
  96.             }
  97.             // line 18
  98.             echo "        ";
  99.             if ( !twig_test_empty(twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'18$this->source); })()), "metaDescription", [], "any"falsefalsefalse18))) {
  100.                 // line 19
  101.                 echo "            <meta name=\"description\" content=\"";
  102.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'19$this->source); })()), "metaDescription", [], "any"falsefalsefalse19), "html"nulltrue);
  103.                 echo "\"/>
  104.         ";
  105.             }
  106.             // line 21
  107.             echo "    ";
  108.         }
  109.         
  110.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  111.         
  112.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  113.     }
  114.     // line 23
  115.     public function block_content($context, array $blocks = [])
  116.     {
  117.         $macros $this->macros;
  118.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  119.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  120.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  121.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  122.         // line 24
  123.         echo "    ";
  124.         if (((isset($context["published"]) || array_key_exists("published"$context) ? $context["published"] : (function () { throw new RuntimeError('Variable "published" does not exist.'24$this->source); })()) == true)) {
  125.             // line 25
  126.             echo "        <div class=\"ui breadcrumb\">
  127.             <a href=\"";
  128.             // line 26
  129.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_homepage");
  130.             echo "\" class=\"section\">";
  131.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("sylius.ui.home"), "html"nulltrue);
  132.             echo "</a>
  133.             <div class=\"divider\"> /</div>
  134.             <div class=\"active section\">";
  135.             // line 28
  136.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'28$this->source); })()), "breadcrumb", [], "any"falsefalsefalse28), "html"nulltrue);
  137.             echo "</div>
  138.         </div>
  139.         <div class=\"ui segment\">
  140.             <h1 class=\"ui dividing header bitbag-page-name\">";
  141.             // line 31
  142.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'31$this->source); })()), "name", [], "any"falsefalsefalse31), "html"nulltrue);
  143.             echo "</h1>
  144.             <div class=\"ui grid center aligned\">
  145.                 <div class=\"wide column\">
  146.                     ";
  147.             // line 35
  148.             if (twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'35$this->source); })()), "image", [], "any"falsefalsefalse35)) {
  149.                 // line 36
  150.                 echo "                        <img class=\"page-image ui fluid image\" src=\"";
  151.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'36$this->source); })()), "image", [], "any"falsefalsefalse36), "path", [], "any"falsefalsefalse36), "html"nulltrue);
  152.                 echo "\" alt=\"\">
  153.                     ";
  154.             }
  155.             // line 38
  156.             echo "                </div>
  157.             </div>
  158.             <div class=\"ui hidden divider\"></div>
  159.             <div class=\"bitbag-page-content\">";
  160.             // line 43
  161.             echo $this->env->getRuntime('BitBag\SyliusCmsPlugin\Twig\Runtime\RenderContentRuntime')->renderContent((isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'43$this->source); })()));
  162.             echo "</div>
  163.             <div class=\"ui dividing header\"></div>
  164.             <div class=\"bitbag-page-sections\">
  165.                 ";
  166.             // line 46
  167.             $this->loadTemplate("@BitBagSyliusCmsPlugin/Shop/Page/Show/_sections.html.twig""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"46)->display($context);
  168.             // line 47
  169.             echo "            </div>
  170.         </div>
  171.         ";
  172.             // line 49
  173.             if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'49$this->source); })()), "products", [], "any"falsefalsefalse49)) > 0)) {
  174.                 // line 50
  175.                 echo "            <h2>
  176.                 ";
  177.                 // line 51
  178.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("bitbag_sylius_cms_plugin.ui.page_related_products"), "html"nulltrue);
  179.                 echo "
  180.             </h2>
  181.             <div class=\"bitbag-page-products\" data-js-products-carousel-id=\"related-products\">
  182.                 ";
  183.                 // line 54
  184.                 $this->loadTemplate("@SyliusShop/Product/_horizontalList.html.twig""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"54)->display(twig_array_merge($context, ["products" => twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'54$this->source); })()), "products", [], "any"falsefalsefalse54)]));
  185.                 // line 55
  186.                 echo "            </div>
  187.         ";
  188.             }
  189.             // line 57
  190.             echo "    ";
  191.         } else {
  192.             // line 58
  193.             echo "        ";
  194.             $this->loadTemplate("@BitBagSyliusCmsPlugin/Shop/Page/Error/_notPublished.html.twig""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig"58)->display(twig_array_merge($context, ["publishAt" => twig_get_attribute($this->env$this->source, (isset($context["page"]) || array_key_exists("page"$context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.'58$this->source); })()), "publishAt", [], "any"falsefalsefalse58)]));
  195.             // line 59
  196.             echo "    ";
  197.         }
  198.         // line 60
  199.         echo "
  200. ";
  201.         
  202.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  203.         
  204.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  205.     }
  206.     public function getTemplateName()
  207.     {
  208.         return "@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig";
  209.     }
  210.     public function isTraitable()
  211.     {
  212.         return false;
  213.     }
  214.     public function getDebugInfo()
  215.     {
  216.         return array (  226 => 60,  223 => 59,  220 => 58,  217 => 57,  213 => 55,  211 => 54,  205 => 51,  202 => 50,  200 => 49,  196 => 47,  194 => 46,  188 => 43,  181 => 38,  175 => 36,  173 => 35,  166 => 31,  160 => 28,  153 => 26,  150 => 25,  147 => 24,  137 => 23,  126 => 21,  120 => 19,  117 => 18,  111 => 16,  108 => 15,  105 => 14,  95 => 13,  81 => 9,  75 => 7,  73 => 6,  63 => 5,  52 => 1,  50 => 3,  37 => 1,);
  217.     }
  218.     public function getSourceContext()
  219.     {
  220.         return new Source("{% extends '@SyliusShop/layout.html.twig' %}
  221. {% set published = (page.publishAt is not null and page.publishAt|date(\"Y-m-d H:i:s\") < \"now\"|date(\"Y-m-d H:i:s\") or page.publishAt is null) %}
  222. {%- block title -%}
  223.     {% if page.title is not empty and published == true  %}
  224.         {{ page.title }}
  225.     {% else %}
  226.         {{ parent() }}
  227.     {% endif %}
  228. {%- endblock -%}
  229. {% block metatags %}
  230.     {% if published == true %}
  231.         {% if page.metaKeywords is not empty %}
  232.             <meta name=\"keywords\" content=\"{{ page.metaKeywords }}\"/>
  233.         {% endif %}
  234.         {% if page.metaDescription is not empty %}
  235.             <meta name=\"description\" content=\"{{ page.metaDescription }}\"/>
  236.         {% endif %}
  237.     {% endif %}
  238. {% endblock %}
  239. {% block content %}
  240.     {% if published == true %}
  241.         <div class=\"ui breadcrumb\">
  242.             <a href=\"{{ path('sylius_shop_homepage') }}\" class=\"section\">{{ 'sylius.ui.home'|trans }}</a>
  243.             <div class=\"divider\"> /</div>
  244.             <div class=\"active section\">{{ page.breadcrumb }}</div>
  245.         </div>
  246.         <div class=\"ui segment\">
  247.             <h1 class=\"ui dividing header bitbag-page-name\">{{ page.name }}</h1>
  248.             <div class=\"ui grid center aligned\">
  249.                 <div class=\"wide column\">
  250.                     {% if page.image %}
  251.                         <img class=\"page-image ui fluid image\" src=\"{{ page.image.path }}\" alt=\"\">
  252.                     {% endif %}
  253.                 </div>
  254.             </div>
  255.             <div class=\"ui hidden divider\"></div>
  256.             <div class=\"bitbag-page-content\">{{ bitbag_cms_render_content(page) }}</div>
  257.             <div class=\"ui dividing header\"></div>
  258.             <div class=\"bitbag-page-sections\">
  259.                 {% include '@BitBagSyliusCmsPlugin/Shop/Page/Show/_sections.html.twig' %}
  260.             </div>
  261.         </div>
  262.         {% if page.products|length > 0 %}
  263.             <h2>
  264.                 {{ 'bitbag_sylius_cms_plugin.ui.page_related_products'|trans }}
  265.             </h2>
  266.             <div class=\"bitbag-page-products\" data-js-products-carousel-id=\"related-products\">
  267.                 {% include '@SyliusShop/Product/_horizontalList.html.twig' with {'products': page.products} %}
  268.             </div>
  269.         {% endif %}
  270.     {% else %}
  271.         {% include '@BitBagSyliusCmsPlugin/Shop/Page/Error/_notPublished.html.twig' with {'publishAt': page.publishAt} %}
  272.     {% endif %}
  273. {% endblock %}
  274. ""@BitBagSyliusCmsPlugin/Shop/Page/show.html.twig""/srv/open_marketplace/templates/bundles/BitBagSyliusCmsPlugin/Shop/Page/show.html.twig");
  275.     }
  276. }