var/cache/dev/twig/98/9835c3184c14b78e100b87257e55d75f.php line 50

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. /* @App/bundles/Ntriga/FrontBundle/home.html.twig */
  14. class __TwigTemplate_f00b44c847c1188622b55636df71fc5b 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 "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", "@App/bundles/Ntriga/FrontBundle/home.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", "@App/bundles/Ntriga/FrontBundle/home.html.twig"));
  40.         $this->parent = $this->loadTemplate("layout.html.twig", "@App/bundles/Ntriga/FrontBundle/home.html.twig", 1);
  41.         $this->parent->display($context, array_merge($this->blocks, $blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 3
  48.     public function block_content($context, array $blocks = [])
  49.     {
  50.         $macros = $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  55.         // line 4
  56.         echo "
  57. ";
  58.         // line 5
  59.         echo $this->env->getFunction('pimcore_inc')->getCallable()((("/" . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 5, $this->source); })()), "request", [], "any", false, false, true, 5), "locale", [], "any", false, false, true, 5), 5, $this->source)) . "/snippets/usps"));
  60.         echo "
  61.     <section class=\"content\">
  62.     <div class=\"container\">
  63.         <div class=\"container-inner\">
  64.             <p class=\"h1\">";
  65.         // line 10
  66.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Bij Devlieger koop je"), "html", null, true);
  67.         echo "</p>
  68.         </div><!--/ .container-inner -->
  69.         ";
  70.         // line 13
  71.         $context["main_categories"] = $this->extensions['App\Twig\Extension\CategoryExtension']->prepareData($this->sandbox->ensureToStringAllowed((isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 13, $this->source); })()), 13, $this->source));
  72.         // line 14
  73.         echo "
  74.         <div class=\"row row--categories\">
  75.         ";
  76.         // line 16
  77.         $context['_parent'] = $context;
  78.         $context['_seq'] = twig_ensure_traversable((isset($context["main_categories"]) || array_key_exists("main_categories", $context) ? $context["main_categories"] : (function () { throw new RuntimeError('Variable "main_categories" does not exist.', 16, $this->source); })()));
  79.         foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
  80.             // line 17
  81.             echo "            <div class=\"col-md-4\">
  82.                 <a href=\"";
  83.             // line 18
  84.             echo twig_escape_filter($this->env, $this->extensions['App\Twig\Extension\CategoryFilterExtension']->generateLink($this->sandbox->ensureToStringAllowed($context["category"], 18, $this->source)), "html", null, true);
  85.             echo "\" class=\"category\">
  86.                     <div class=\"category__title\"><div class=\"text\">";
  87.             // line 19
  88.             echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, true, 19), 19, $this->source), "html", null, true);
  89.             echo "</div></div>
  90.                     <div class=\"category__img\">
  91.                     ";
  92.             // line 22
  93.             if (twig_get_attribute($this->env, $this->source, $context["category"], "photo", [], "any", false, false, true, 22)) {
  94.                 // line 23
  95.                 echo "                        ";
  96.                 echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["category"], "photo", [], "any", false, false, true, 23), "thumbnail", ["CategoryThumbnail"], "method", false, false, true, 23), "html", [["loading" => "eager"]], "method", false, false, true, 23), 23, $this->source);
  97.                 // line 25
  98.                 echo "
  99.                     ";
  100.             } else {
  101.                 // line 27
  102.                 echo "                        <img class=\"img-fluid\" src=\"";
  103.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/img/placeholder-category.png"), "html", null, true);
  104.                 echo "\">
  105.                     ";
  106.             }
  107.             // line 29
  108.             echo "                    </div>
  109.                 </a>
  110.             </div>
  111.         ";
  112.         }
  113.         $_parent = $context['_parent'];
  114.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
  115.         $context = array_intersect_key($context, $_parent) + $_parent;
  116.         // line 33
  117.         echo "        </div><!--/ .row -->
  118.     ";
  119.         // line 35
  120.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_FULLY")) {
  121.             // line 36
  122.             echo "        <div class=\"container-inner\">
  123.             <p class=\"h1\">";
  124.             // line 37
  125.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Jouw bewaarde items"), "html", null, true);
  126.             echo "</p>
  127.         </div><!--/ .container-inner -->
  128.         ";
  129.             // line 40
  130.             $context["doc_favorites"] = twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 40, $this->source); })()), "getProperty", ["user_favorites_document"], "method", false, false, true, 40);
  131.             // line 41
  132.             echo "        ";
  133.             $context["doc_orders"] = twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 41, $this->source); })()), "getProperty", ["user_orders_document"], "method", false, false, true, 41);
  134.             // line 42
  135.             echo "        ";
  136.             $context["doc_products"] = twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 42, $this->source); })()), "getProperty", ["user_products_document"], "method", false, false, true, 42);
  137.             // line 43
  138.             echo "
  139.         <div class=\"row\">
  140.             ";
  141.             // line 45
  142.             if ((isset($context["doc_favorites"]) || array_key_exists("doc_favorites", $context) ? $context["doc_favorites"] : (function () { throw new RuntimeError('Variable "doc_favorites" does not exist.', 45, $this->source); })())) {
  143.                 // line 46
  144.                 echo "            <div class=\"col-md-4 d-flex flex-column\">
  145.                 <a href=\"";
  146.                 // line 47
  147.                 echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["doc_favorites"]) || array_key_exists("doc_favorites", $context) ? $context["doc_favorites"] : (function () { throw new RuntimeError('Variable "doc_favorites" does not exist.', 47, $this->source); })()), "fullpath", [], "any", false, false, true, 47), 47, $this->source), "html", null, true);
  148.                 echo "\" class=\"btn btn-icon\"><img src=\"";
  149.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/img/icon-star.png"), "html", null, true);
  150.                 echo "\" alt=\"\">Mijn bestellijsten</a>
  151.             </div>
  152.             ";
  153.             }
  154.             // line 50
  155.             echo "
  156.             ";
  157.             // line 51
  158.             if ((isset($context["doc_orders"]) || array_key_exists("doc_orders", $context) ? $context["doc_orders"] : (function () { throw new RuntimeError('Variable "doc_orders" does not exist.', 51, $this->source); })())) {
  159.                 // line 52
  160.                 echo "            <div class=\"col-md-4 d-flex flex-column\">
  161.                 <a href=\"";
  162.                 // line 53
  163.                 echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["doc_orders"]) || array_key_exists("doc_orders", $context) ? $context["doc_orders"] : (function () { throw new RuntimeError('Variable "doc_orders" does not exist.', 53, $this->source); })()), "fullpath", [], "any", false, false, true, 53), 53, $this->source), "html", null, true);
  164.                 echo "\" class=\"btn btn-icon\"><img src=\"";
  165.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/img/icon-order.png"), "html", null, true);
  166.                 echo "\" alt=\"\">Eerdere bestellingen</a>
  167.             </div>
  168.             ";
  169.             }
  170.             // line 56
  171.             echo "
  172.             ";
  173.             // line 57
  174.             if ((isset($context["doc_products"]) || array_key_exists("doc_products", $context) ? $context["doc_products"] : (function () { throw new RuntimeError('Variable "doc_products" does not exist.', 57, $this->source); })())) {
  175.                 // line 58
  176.                 echo "            <div class=\"col-md-4 d-flex flex-column\">
  177.                 <a href=\"";
  178.                 // line 59
  179.                 echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["doc_products"]) || array_key_exists("doc_products", $context) ? $context["doc_products"] : (function () { throw new RuntimeError('Variable "doc_products" does not exist.', 59, $this->source); })()), "fullpath", [], "any", false, false, true, 59), 59, $this->source), "html", null, true);
  180.                 echo "\" class=\"btn btn-icon\"><img src=\"";
  181.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/img/icon-fiche.png"), "html", null, true);
  182.                 echo "\" alt=\"\">Reeds besteld</a>
  183.             </div>
  184.             ";
  185.             }
  186.             // line 62
  187.             echo "        </div><!--/ .row -->
  188.     ";
  189.         }
  190.         // line 64
  191.         echo "    </div><!--/ .container-fluid -->
  192. </section>
  193. ";
  194.         // line 67
  195.         echo $this->env->getFunction('pimcore_inc')->getCallable()((("/" . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 67, $this->source); })()), "request", [], "any", false, false, true, 67), "locale", [], "any", false, false, true, 67), 67, $this->source)) . "/snippets/promo-banner"));
  196.         echo "
  197. ";
  198.         // line 70
  199.         echo "
  200. ";
  201.         // line 71
  202.         echo $this->env->getFunction('pimcore_inc')->getCallable()((("/" . $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 71, $this->source); })()), "request", [], "any", false, false, true, 71), "locale", [], "any", false, false, true, 71), 71, $this->source)) . "/snippets/access-banner"));
  203.         echo "
  204. ";
  205.         
  206.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  207.         
  208.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  209.     }
  210.     public function getTemplateName()
  211.     {
  212.         return "@App/bundles/Ntriga/FrontBundle/home.html.twig";
  213.     }
  214.     public function isTraitable()
  215.     {
  216.         return false;
  217.     }
  218.     public function getDebugInfo()
  219.     {
  220.         return array (  223 => 71,  220 => 70,  215 => 67,  210 => 64,  206 => 62,  198 => 59,  195 => 58,  193 => 57,  190 => 56,  182 => 53,  179 => 52,  177 => 51,  174 => 50,  166 => 47,  163 => 46,  161 => 45,  157 => 43,  154 => 42,  151 => 41,  149 => 40,  143 => 37,  140 => 36,  138 => 35,  134 => 33,  125 => 29,  119 => 27,  115 => 25,  112 => 23,  110 => 22,  104 => 19,  100 => 18,  97 => 17,  93 => 16,  89 => 14,  87 => 13,  81 => 10,  73 => 5,  70 => 4,  60 => 3,  37 => 1,);
  221.     }
  222.     public function getSourceContext()
  223.     {
  224.         return new Source("{% extends 'layout.html.twig' %}
  225. {% block content %}
  226. {{ pimcore_inc('/' ~ app.request.locale ~ '/snippets/usps') }}
  227.     <section class=\"content\">
  228.     <div class=\"container\">
  229.         <div class=\"container-inner\">
  230.             <p class=\"h1\">{{ 'Bij Devlieger koop je'|trans }}</p>
  231.         </div><!--/ .container-inner -->
  232.         {% set main_categories = app_get_main_categories(document) %}
  233.         <div class=\"row row--categories\">
  234.         {% for category in main_categories %}
  235.             <div class=\"col-md-4\">
  236.                 <a href=\"{{ app_category_filter_generate_link(category) }}\" class=\"category\">
  237.                     <div class=\"category__title\"><div class=\"text\">{{ category.name }}</div></div>
  238.                     <div class=\"category__img\">
  239.                     {% if category.photo %}
  240.                         {{ category.photo.thumbnail('CategoryThumbnail').html({
  241.                             'loading': 'eager'
  242.                         })|raw }}
  243.                     {% else %}
  244.                         <img class=\"img-fluid\" src=\"{{ asset('/img/placeholder-category.png') }}\">
  245.                     {% endif %}
  246.                     </div>
  247.                 </a>
  248.             </div>
  249.         {% endfor %}
  250.         </div><!--/ .row -->
  251.     {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  252.         <div class=\"container-inner\">
  253.             <p class=\"h1\">{{ 'Jouw bewaarde items'|trans }}</p>
  254.         </div><!--/ .container-inner -->
  255.         {% set doc_favorites = document.getProperty('user_favorites_document') %}
  256.         {% set doc_orders = document.getProperty('user_orders_document') %}
  257.         {% set doc_products = document.getProperty('user_products_document') %}
  258.         <div class=\"row\">
  259.             {% if doc_favorites %}
  260.             <div class=\"col-md-4 d-flex flex-column\">
  261.                 <a href=\"{{ doc_favorites.fullpath }}\" class=\"btn btn-icon\"><img src=\"{{ asset('/img/icon-star.png') }}\" alt=\"\">Mijn bestellijsten</a>
  262.             </div>
  263.             {% endif %}
  264.             {% if doc_orders %}
  265.             <div class=\"col-md-4 d-flex flex-column\">
  266.                 <a href=\"{{ doc_orders.fullpath }}\" class=\"btn btn-icon\"><img src=\"{{ asset('/img/icon-order.png') }}\" alt=\"\">Eerdere bestellingen</a>
  267.             </div>
  268.             {% endif %}
  269.             {% if doc_products %}
  270.             <div class=\"col-md-4 d-flex flex-column\">
  271.                 <a href=\"{{ doc_products.fullpath }}\" class=\"btn btn-icon\"><img src=\"{{ asset('/img/icon-fiche.png') }}\" alt=\"\">Reeds besteld</a>
  272.             </div>
  273.             {% endif %}
  274.         </div><!--/ .row -->
  275.     {% endif %}
  276.     </div><!--/ .container-fluid -->
  277. </section>
  278. {{ pimcore_inc('/' ~ app.request.locale ~ '/snippets/promo-banner') }}
  279. {#% include 'includes/promos.html.twig' %#}
  280. {{ pimcore_inc('/' ~ app.request.locale ~ '/snippets/access-banner') }}
  281. {% endblock %}", "@App/bundles/Ntriga/FrontBundle/home.html.twig", "/data/sites/web/devliegerfilipbe/subsites/dev.devliegerfilip.dspdev.be/templates/bundles/Ntriga/FrontBundle/home.html.twig");
  282.     }
  283.     
  284.     public function checkSecurity()
  285.     {
  286.         static $tags = array("set" => 13, "for" => 16, "if" => 22);
  287.         static $filters = array("escape" => 10, "trans" => 10, "raw" => 25);
  288.         static $functions = array("pimcore_inc" => 5, "app_get_main_categories" => 13, "app_category_filter_generate_link" => 18, "asset" => 27, "is_granted" => 35);
  289.         try {
  290.             $this->sandbox->checkSecurity(
  291.                 ['set', 'for', 'if'],
  292.                 ['escape', 'trans', 'raw'],
  293.                 ['pimcore_inc', 'app_get_main_categories', 'app_category_filter_generate_link', 'asset', 'is_granted']
  294.             );
  295.         } catch (SecurityError $e) {
  296.             $e->setSourceContext($this->source);
  297.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  298.                 $e->setTemplateLine($tags[$e->getTagName()]);
  299.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  300.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  301.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  302.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  303.             }
  304.             throw $e;
  305.         }
  306.     }
  307. }