var/cache/dev/twig/7e/7e1fc29ce2ca0de0a7cf30eb85f2f17f.php line 40

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. /* cart/index.html.twig */
  14. class __TwigTemplate_cb0b20ae2de5f9c744fd78329f6bb38e 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->blocks = [
  23.             'content' => [$this'block_content'],
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return $this->loadTemplate($this->extensions['App\Twig\Extension\WebsiteExtension']->getBaseLayout(), "cart/index.html.twig"1);
  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""cart/index.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""cart/index.html.twig"));
  40.         $this->getParent($context)->display($contextarray_merge($this->blocks$blocks));
  41.         
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  43.         
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  45.     }
  46.     // line 3
  47.     public function block_content($context, array $blocks = [])
  48.     {
  49.         $macros $this->macros;
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  54.         // line 4
  55.         echo "    <div class=\"container mb-5\">
  56.         <div class=\"row mb-3\">
  57.             <div class=\"col-12\">
  58.                 <h1 class=\"text-center mb-5\">
  59.                     <span class=\"heading-line primary\">
  60.                         ";
  61.         // line 10
  62.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Winkelmandje"), "html"nulltrue);
  63.         echo "
  64.                     </span>
  65.                 </h1>
  66.             </div>
  67.         </div>
  68.         ";
  69.         // line 17
  70.         if (array_key_exists("cartItems"$context)) {
  71.             // line 18
  72.             echo "            <div>
  73.                 ";
  74.             // line 19
  75.             $context['_parent'] = $context;
  76.             $context['_seq'] = twig_ensure_traversable((isset($context["cartItems"]) || array_key_exists("cartItems"$context) ? $context["cartItems"] : (function () { throw new RuntimeError('Variable "cartItems" does not exist.'19$this->source); })()));
  77.             $context['loop'] = [
  78.               'parent' => $context['_parent'],
  79.               'index0' => 0,
  80.               'index'  => 1,
  81.               'first'  => true,
  82.             ];
  83.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  84.                 $length count($context['_seq']);
  85.                 $context['loop']['revindex0'] = $length 1;
  86.                 $context['loop']['revindex'] = $length;
  87.                 $context['loop']['length'] = $length;
  88.                 $context['loop']['last'] = === $length;
  89.             }
  90.             foreach ($context['_seq'] as $context["_key"] => $context["cartItem"]) {
  91.                 // line 20
  92.                 echo "                    ";
  93.                 $this->loadTemplate("cart/item.html.twig""cart/index.html.twig"20)->display(twig_array_merge($context, ["amountIsEditable" => (isset($context["amountIsEditable"]) || array_key_exists("amountIsEditable"$context) ? $context["amountIsEditable"] : (function () { throw new RuntimeError('Variable "amountIsEditable" does not exist.'20$this->source); })())]));
  94.                 // line 21
  95.                 echo "                ";
  96.                 ++$context['loop']['index0'];
  97.                 ++$context['loop']['index'];
  98.                 $context['loop']['first'] = false;
  99.                 if (isset($context['loop']['length'])) {
  100.                     --$context['loop']['revindex0'];
  101.                     --$context['loop']['revindex'];
  102.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  103.                 }
  104.             }
  105.             $_parent $context['_parent'];
  106.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['cartItem'], $context['_parent'], $context['loop']);
  107.             $context array_intersect_key($context$_parent) + $_parent;
  108.             // line 22
  109.             echo "                <hr/>
  110.                 <div class=\"row mb-3\">
  111.                     <div class=\"col-6 text-start\">
  112.                         <a href=\"#\" id=\"clear_cart\"><i class=\"fas fa-trash me-1\"></i>";
  113.             // line 26
  114.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Empty Cart"), "html"nulltrue);
  115.             echo "</a>
  116.                     </div>
  117.                     <div class=\"col-6 text-end\">
  118.                         <b>";
  119.             // line 29
  120.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Totaal (excl. verzending)"), "html"nulltrue);
  121.             echo "</b>&nbsp;<span id=\"cartTotal\">€";
  122.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["cartTotal"]) || array_key_exists("cartTotal"$context) ? $context["cartTotal"] : (function () { throw new RuntimeError('Variable "cartTotal" does not exist.'29$this->source); })()), 29$this->source), "html"nulltrue);
  123.             echo "</span>
  124.                     </div>
  125.                 </div>
  126.             </div>
  127.             ";
  128.             // line 36
  129.             if (twig_test_empty((isset($context["user"]) || array_key_exists("user"$context) ? $context["user"] : (function () { throw new RuntimeError('Variable "user" does not exist.'36$this->source); })()))) {
  130.                 // line 37
  131.                 echo "                <div class=\"row mt-5\">
  132.                     <div class=\"col text-center\">
  133.                 <p>";
  134.                 // line 39
  135.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Log in of maak een account om de bestelling af te ronden."), "html"nulltrue);
  136.                 echo "</p>
  137.                 <a href=\"";
  138.                 // line 40
  139.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("login-page");
  140.                 echo "\" class=\"btn btn-primary me-3\">";
  141.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Inloggen"), "html"nulltrue);
  142.                 echo "</a>
  143.                 <a href=\"";
  144.                 // line 41
  145.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("signup-page");
  146.                 echo "\" class=\"btn btn-outline-primary\">";
  147.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Registreren"), "html"nulltrue);
  148.                 echo "</a>
  149.                     </div>
  150.                 </div>
  151.             ";
  152.             } else {
  153.                 // line 46
  154.                 echo "                <div class=\"row\">
  155.                     <div class=\"col-12 d-flex justify-content-center\">
  156.                         <a href=\"";
  157.                 // line 48
  158.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("cart-delivery");
  159.                 echo "\" class=\"btn btn-primary btn-lg\">";
  160.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Levering"), "html"nulltrue);
  161.                 echo "</a>
  162.                     </div>
  163.                 </div>
  164.             ";
  165.             }
  166.             // line 52
  167.             echo "        ";
  168.         } else {
  169.             // line 53
  170.             echo "            <p>";
  171.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Nog geen producten in het winkelkarretje, bekijk het aanbod om aan de slag te gaan."), "html"nulltrue);
  172.             echo "</p>
  173.         ";
  174.         }
  175.         // line 55
  176.         echo "        <br/>
  177.         <br/>
  178.     </div>
  179. ";
  180.         
  181.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  182.         
  183.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  184.     }
  185.     public function getTemplateName()
  186.     {
  187.         return "cart/index.html.twig";
  188.     }
  189.     public function isTraitable()
  190.     {
  191.         return false;
  192.     }
  193.     public function getDebugInfo()
  194.     {
  195.         return array (  198 => 55,  192 => 53,  189 => 52,  180 => 48,  176 => 46,  166 => 41,  160 => 40,  156 => 39,  152 => 37,  150 => 36,  138 => 29,  132 => 26,  126 => 22,  112 => 21,  109 => 20,  92 => 19,  89 => 18,  87 => 17,  77 => 10,  69 => 4,  59 => 3,  37 => 1,);
  196.     }
  197.     public function getSourceContext()
  198.     {
  199.         return new Source("{% extends base_layout() %}
  200. {% block content %}
  201.     <div class=\"container mb-5\">
  202.         <div class=\"row mb-3\">
  203.             <div class=\"col-12\">
  204.                 <h1 class=\"text-center mb-5\">
  205.                     <span class=\"heading-line primary\">
  206.                         {{ 'Winkelmandje' | trans }}
  207.                     </span>
  208.                 </h1>
  209.             </div>
  210.         </div>
  211.         {% if cartItems is defined %}
  212.             <div>
  213.                 {% for cartItem in cartItems %}
  214.                     {% include 'cart/item.html.twig' with {'amountIsEditable' : amountIsEditable}  %}
  215.                 {% endfor %}
  216.                 <hr/>
  217.                 <div class=\"row mb-3\">
  218.                     <div class=\"col-6 text-start\">
  219.                         <a href=\"#\" id=\"clear_cart\"><i class=\"fas fa-trash me-1\"></i>{{ 'Empty Cart' | trans }}</a>
  220.                     </div>
  221.                     <div class=\"col-6 text-end\">
  222.                         <b>{{ 'Totaal (excl. verzending)' | trans }}</b>&nbsp;<span id=\"cartTotal\">€{{ cartTotal }}</span>
  223.                     </div>
  224.                 </div>
  225.             </div>
  226.             {% if user is empty %}
  227.                 <div class=\"row mt-5\">
  228.                     <div class=\"col text-center\">
  229.                 <p>{{ 'Log in of maak een account om de bestelling af te ronden.'|trans }}</p>
  230.                 <a href=\"{{ path(\"login-page\") }}\" class=\"btn btn-primary me-3\">{{ 'Inloggen'|trans }}</a>
  231.                 <a href=\"{{ path(\"signup-page\") }}\" class=\"btn btn-outline-primary\">{{ 'Registreren'|trans }}</a>
  232.                     </div>
  233.                 </div>
  234.             {% else %}
  235.                 <div class=\"row\">
  236.                     <div class=\"col-12 d-flex justify-content-center\">
  237.                         <a href=\"{{ path(\"cart-delivery\") }}\" class=\"btn btn-primary btn-lg\">{{ 'Levering'|trans }}</a>
  238.                     </div>
  239.                 </div>
  240.             {% endif %}
  241.         {% else %}
  242.             <p>{{ 'Nog geen producten in het winkelkarretje, bekijk het aanbod om aan de slag te gaan.'|trans }}</p>
  243.         {% endif %}
  244.         <br/>
  245.         <br/>
  246.     </div>
  247. {% endblock %}""cart/index.html.twig""/var/www/clients/client2/web42/web/pc/templates/cart/index.html.twig");
  248.     }
  249.     
  250.     public function checkSecurity()
  251.     {
  252.         static $tags = array("if" => 17"for" => 19"include" => 20);
  253.         static $filters = array("escape" => 10"trans" => 10);
  254.         static $functions = array("path" => 40"base_layout" => 1);
  255.         try {
  256.             $this->sandbox->checkSecurity(
  257.                 ['if''for''include'],
  258.                 ['escape''trans'],
  259.                 ['path''base_layout']
  260.             );
  261.         } catch (SecurityError $e) {
  262.             $e->setSourceContext($this->source);
  263.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  264.                 $e->setTemplateLine($tags[$e->getTagName()]);
  265.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  266.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  267.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  268.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  269.             }
  270.             throw $e;
  271.         }
  272.     }
  273. }