<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @App/bundles/Ntriga/FrontBundle/home.html.twig */
class __TwigTemplate_f00b44c847c1188622b55636df71fc5b extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return "layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/bundles/Ntriga/FrontBundle/home.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/bundles/Ntriga/FrontBundle/home.html.twig"));
$this->parent = $this->loadTemplate("layout.html.twig", "@App/bundles/Ntriga/FrontBundle/home.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo "
";
// line 5
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"));
echo "
<section class=\"content\">
<div class=\"container\">
<div class=\"container-inner\">
<p class=\"h1\">";
// line 10
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Bij Devlieger koop je"), "html", null, true);
echo "</p>
</div><!--/ .container-inner -->
";
// line 13
$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));
// line 14
echo "
<div class=\"row row--categories\">
";
// line 16
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 17
echo " <div class=\"col-md-4\">
<a href=\"";
// line 18
echo twig_escape_filter($this->env, $this->extensions['App\Twig\Extension\CategoryFilterExtension']->generateLink($this->sandbox->ensureToStringAllowed($context["category"], 18, $this->source)), "html", null, true);
echo "\" class=\"category\">
<div class=\"category__title\"><div class=\"text\">";
// line 19
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);
echo "</div></div>
<div class=\"category__img\">
";
// line 22
if (twig_get_attribute($this->env, $this->source, $context["category"], "photo", [], "any", false, false, true, 22)) {
// line 23
echo " ";
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);
// line 25
echo "
";
} else {
// line 27
echo " <img class=\"img-fluid\" src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/img/placeholder-category.png"), "html", null, true);
echo "\">
";
}
// line 29
echo " </div>
</a>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 33
echo " </div><!--/ .row -->
";
// line 35
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_AUTHENTICATED_FULLY")) {
// line 36
echo " <div class=\"container-inner\">
<p class=\"h1\">";
// line 37
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Jouw bewaarde items"), "html", null, true);
echo "</p>
</div><!--/ .container-inner -->
";
// line 40
$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);
// line 41
echo " ";
$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);
// line 42
echo " ";
$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);
// line 43
echo "
<div class=\"row\">
";
// line 45
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); })())) {
// line 46
echo " <div class=\"col-md-4 d-flex flex-column\">
<a href=\"";
// line 47
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);
echo "\" class=\"btn btn-icon\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/img/icon-star.png"), "html", null, true);
echo "\" alt=\"\">Mijn bestellijsten</a>
</div>
";
}
// line 50
echo "
";
// line 51
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); })())) {
// line 52
echo " <div class=\"col-md-4 d-flex flex-column\">
<a href=\"";
// line 53
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);
echo "\" class=\"btn btn-icon\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/img/icon-order.png"), "html", null, true);
echo "\" alt=\"\">Eerdere bestellingen</a>
</div>
";
}
// line 56
echo "
";
// line 57
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); })())) {
// line 58
echo " <div class=\"col-md-4 d-flex flex-column\">
<a href=\"";
// line 59
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);
echo "\" class=\"btn btn-icon\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/img/icon-fiche.png"), "html", null, true);
echo "\" alt=\"\">Reeds besteld</a>
</div>
";
}
// line 62
echo " </div><!--/ .row -->
";
}
// line 64
echo " </div><!--/ .container-fluid -->
</section>
";
// line 67
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"));
echo "
";
// line 70
echo "
";
// line 71
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"));
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@App/bundles/Ntriga/FrontBundle/home.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{% extends 'layout.html.twig' %}
{% block content %}
{{ pimcore_inc('/' ~ app.request.locale ~ '/snippets/usps') }}
<section class=\"content\">
<div class=\"container\">
<div class=\"container-inner\">
<p class=\"h1\">{{ 'Bij Devlieger koop je'|trans }}</p>
</div><!--/ .container-inner -->
{% set main_categories = app_get_main_categories(document) %}
<div class=\"row row--categories\">
{% for category in main_categories %}
<div class=\"col-md-4\">
<a href=\"{{ app_category_filter_generate_link(category) }}\" class=\"category\">
<div class=\"category__title\"><div class=\"text\">{{ category.name }}</div></div>
<div class=\"category__img\">
{% if category.photo %}
{{ category.photo.thumbnail('CategoryThumbnail').html({
'loading': 'eager'
})|raw }}
{% else %}
<img class=\"img-fluid\" src=\"{{ asset('/img/placeholder-category.png') }}\">
{% endif %}
</div>
</a>
</div>
{% endfor %}
</div><!--/ .row -->
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
<div class=\"container-inner\">
<p class=\"h1\">{{ 'Jouw bewaarde items'|trans }}</p>
</div><!--/ .container-inner -->
{% set doc_favorites = document.getProperty('user_favorites_document') %}
{% set doc_orders = document.getProperty('user_orders_document') %}
{% set doc_products = document.getProperty('user_products_document') %}
<div class=\"row\">
{% if doc_favorites %}
<div class=\"col-md-4 d-flex flex-column\">
<a href=\"{{ doc_favorites.fullpath }}\" class=\"btn btn-icon\"><img src=\"{{ asset('/img/icon-star.png') }}\" alt=\"\">Mijn bestellijsten</a>
</div>
{% endif %}
{% if doc_orders %}
<div class=\"col-md-4 d-flex flex-column\">
<a href=\"{{ doc_orders.fullpath }}\" class=\"btn btn-icon\"><img src=\"{{ asset('/img/icon-order.png') }}\" alt=\"\">Eerdere bestellingen</a>
</div>
{% endif %}
{% if doc_products %}
<div class=\"col-md-4 d-flex flex-column\">
<a href=\"{{ doc_products.fullpath }}\" class=\"btn btn-icon\"><img src=\"{{ asset('/img/icon-fiche.png') }}\" alt=\"\">Reeds besteld</a>
</div>
{% endif %}
</div><!--/ .row -->
{% endif %}
</div><!--/ .container-fluid -->
</section>
{{ pimcore_inc('/' ~ app.request.locale ~ '/snippets/promo-banner') }}
{#% include 'includes/promos.html.twig' %#}
{{ pimcore_inc('/' ~ app.request.locale ~ '/snippets/access-banner') }}
{% endblock %}", "@App/bundles/Ntriga/FrontBundle/home.html.twig", "/data/sites/web/devliegerfilipbe/subsites/dev.devliegerfilip.dspdev.be/templates/bundles/Ntriga/FrontBundle/home.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 13, "for" => 16, "if" => 22);
static $filters = array("escape" => 10, "trans" => 10, "raw" => 25);
static $functions = array("pimcore_inc" => 5, "app_get_main_categories" => 13, "app_category_filter_generate_link" => 18, "asset" => 27, "is_granted" => 35);
try {
$this->sandbox->checkSecurity(
['set', 'for', 'if'],
['escape', 'trans', 'raw'],
['pimcore_inc', 'app_get_main_categories', 'app_category_filter_generate_link', 'asset', 'is_granted']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}