<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* areas/product-category-cards-brick/partials/category-card.html.twig */
class __TwigTemplate_60ef8e8715afdde8fa7af3003aa9d1329966c2d9ea0a70aa40539ca4771b91f5 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-category-cards-brick/partials/category-card.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-category-cards-brick/partials/category-card.html.twig"));
// line 1
yield "<a
";
// line 2
if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 2, $this->source); })()), "page", [], "method", false, false, true, 2)) {
// line 3
yield " href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\UrlExtension']->trimUrl($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 3, $this->source); })()), "page", [], "method", false, false, true, 3), "url", [], "any", false, false, true, 3), 3, $this->source)), "html", null, true);
yield "\"
";
}
// line 5
yield " class=\"flex flex-col bg-white overflow-hidden rounded-md group
\"
>
";
// line 8
if (((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 8, $this->source); })()) && !CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["productCategory"] ?? null), "page", [], "method", false, true, true, 8), "url", [], "any", true, true, true, 8))) {
// line 9
yield " ";
yield from $this->loadTemplate("areas/product-category-cards-brick/partials/category-card.html.twig", "areas/product-category-cards-brick/partials/category-card.html.twig", 9, "188387334")->unwrap()->yield($context);
// line 12
yield " ";
}
// line 13
yield " <div class=\"relative text-center\">
";
// line 14
if (CoreExtension::getAttribute($this->env, $this->source, ($context["productCategory"] ?? null), "renderThumbnail", [], "any", true, true, true, 14)) {
// line 15
yield " ";
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 15, $this->source); })()), "renderThumbnail", ["product-category-thumbnail", ["pictureAttributes" => ["class" => "block lg:w-full aspect-[16/9]"], "imgAttributes" => ["class" => "object-cov er object-center w-full h-full"]]], "method", false, false, true, 15), 15, $this->source);
// line 23
yield "
";
}
// line 25
yield " </div>
<div class=\"flex flex-col h-full justify-between px-6 py-4 w-full\">
<h3 class=\"mb-0 text-lg font-bold group-hover:text-blue\">
";
// line 28
yield ((CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 28, $this->source); })()), "name", [], "any", false, false, true, 28)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 28, $this->source); })()), "name", [], "any", false, false, true, 28), 28, $this->source), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 28, $this->source); })()), "key", [], "any", false, false, true, 28), 28, $this->source), "html", null, true)));
yield "
</h3>
";
// line 30
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), ((CoreExtension::getAttribute($this->env, $this->source, ($context["productCategory"] ?? null), "getUsps", [], "method", true, true, true, 30)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, ($context["productCategory"] ?? null), "getUsps", [], "method", false, false, true, 30), [])) : ([]))) > 0)) {
// line 31
yield " <ul class=\"my-8 h-full\">
";
// line 32
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["productCategory"]) || array_key_exists("productCategory", $context) ? $context["productCategory"] : (function () { throw new RuntimeError('Variable "productCategory" does not exist.', 32, $this->source); })()), "getUsps", [], "method", false, false, true, 32));
foreach ($context['_seq'] as $context["_key"] => $context["usp"]) {
// line 33
yield " <li class=\"mb-4 flex flex-row gap-2\">
<svg class=\"mt-2 min-w-[16px]\" xmlns=\"http://www.w3.org/2000/svg\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16px\"
height=\"11.4288571px\" viewBox=\"0 0 16 11.4288571\"
version=\"1.1\">
<g id=\"post-detail\" stroke=\"none\" stroke-width=\"1\"
fill=\"none\" fill-rule=\"evenodd\">
<g id=\"coolworld-post-detail-vd-1504-v03\"
transform=\"translate(-339.999886, -3485.999977)\"
fill=\"#01B902\">
<g id=\"toegepaste-producten\"
transform=\"translate(0.000000, 3083.000000)\">
<g id=\"Group-6\"
transform=\"translate(316.000000, 60.000000)\">
<g id=\"Group-4\"
transform=\"translate(0.000000, 85.000000)\">
<g id=\"icons/ui/check-circle\"
transform=\"translate(23.999886, 257.999977)\">
<path
d=\"M14.384,0 L16,1.616 L11.6251429,5.99085714 L6.52228571,11.0937143 C6.07657143,11.5405714 5.35314286,11.5405714 4.90742857,11.0937143 L4.90628571,11.0937143 L0,6.18742857 L1.616,4.57142857 L5.71428571,8.66971429 L14.384,0 Z\"
id=\"Fill-1\"/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
";
// line 61
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["usp"], "usp_title", [], "any", false, false, true, 61), "getData", [], "method", false, false, true, 61), 61, $this->source), "html", null, true);
yield "
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['usp'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 64
yield " </ul>
";
}
// line 66
yield " <button class=\"button button__primary button--block button--no-padding\">
";
// line 67
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("view.product"), "html", null, true);
yield "
</button>
</div>
</a>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "areas/product-category-cards-brick/partials/category-card.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 151 => 67, 148 => 66, 144 => 64, 135 => 61, 105 => 33, 101 => 32, 98 => 31, 96 => 30, 91 => 28, 86 => 25, 82 => 23, 79 => 15, 77 => 14, 74 => 13, 71 => 12, 68 => 9, 66 => 8, 61 => 5, 55 => 3, 53 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("<a
{% if productCategory.page() %}
href=\"{{ productCategory.page().url | trimUrl }}\"
{% endif %}
class=\"flex flex-col bg-white overflow-hidden rounded-md group
\"
>
{% if editmode and productCategory.page().url is not defined %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Er is nog geen pagina ingesteld voor dit product. {% endblock %}
{% endembed %}
{% endif %}
<div class=\"relative text-center\">
{% if productCategory.renderThumbnail is defined %}
{{ productCategory.renderThumbnail('product-category-thumbnail', {
'pictureAttributes': {
'class': 'block lg:w-full aspect-[16/9]'
},
'imgAttributes': {
'class': 'object-cov er object-center w-full h-full',
},
})|raw }}
{% endif %}
</div>
<div class=\"flex flex-col h-full justify-between px-6 py-4 w-full\">
<h3 class=\"mb-0 text-lg font-bold group-hover:text-blue\">
{{ productCategory.name ?: productCategory.key }}
</h3>
{% if productCategory.getUsps() | default([]) | length > 0 %}
<ul class=\"my-8 h-full\">
{% for usp in productCategory.getUsps() %}
<li class=\"mb-4 flex flex-row gap-2\">
<svg class=\"mt-2 min-w-[16px]\" xmlns=\"http://www.w3.org/2000/svg\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16px\"
height=\"11.4288571px\" viewBox=\"0 0 16 11.4288571\"
version=\"1.1\">
<g id=\"post-detail\" stroke=\"none\" stroke-width=\"1\"
fill=\"none\" fill-rule=\"evenodd\">
<g id=\"coolworld-post-detail-vd-1504-v03\"
transform=\"translate(-339.999886, -3485.999977)\"
fill=\"#01B902\">
<g id=\"toegepaste-producten\"
transform=\"translate(0.000000, 3083.000000)\">
<g id=\"Group-6\"
transform=\"translate(316.000000, 60.000000)\">
<g id=\"Group-4\"
transform=\"translate(0.000000, 85.000000)\">
<g id=\"icons/ui/check-circle\"
transform=\"translate(23.999886, 257.999977)\">
<path
d=\"M14.384,0 L16,1.616 L11.6251429,5.99085714 L6.52228571,11.0937143 C6.07657143,11.5405714 5.35314286,11.5405714 4.90742857,11.0937143 L4.90628571,11.0937143 L0,6.18742857 L1.616,4.57142857 L5.71428571,8.66971429 L14.384,0 Z\"
id=\"Fill-1\"/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
{{ usp.usp_title.getData() }}
</li>
{% endfor %}
</ul>
{% endif %}
<button class=\"button button__primary button--block button--no-padding\">
{{ 'view.product' | trans }}
</button>
</div>
</a>", "areas/product-category-cards-brick/partials/category-card.html.twig", "/home/forge/testing.coolworld.ptchr.dev/templates/areas/product-category-cards-brick/partials/category-card.html.twig");
}
public function checkSecurity()
{
static $tags = ["if" => 2, "embed" => 9, "for" => 32];
static $filters = ["escape" => 3, "trimUrl" => 3, "raw" => 23, "length" => 30, "default" => 30, "trans" => 67];
static $functions = [];
try {
$this->sandbox->checkSecurity(
['if', 'embed', 'for'],
['escape', 'trimUrl', 'raw', 'length', 'default', 'trans'],
[],
$this->source
);
} 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;
}
}
}
/* areas/product-category-cards-brick/partials/category-card.html.twig */
class __TwigTemplate_60ef8e8715afdde8fa7af3003aa9d1329966c2d9ea0a70aa40539ca4771b91f5___188387334 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 9
return "app/editmodenotice.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-category-cards-brick/partials/category-card.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/product-category-cards-brick/partials/category-card.html.twig"));
$this->parent = $this->loadTemplate("app/editmodenotice.html.twig", "areas/product-category-cards-brick/partials/category-card.html.twig", 9);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 10
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield " Er is nog geen pagina ingesteld voor dit product. ";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "areas/product-category-cards-brick/partials/category-card.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 342 => 10, 319 => 9, 151 => 67, 148 => 66, 144 => 64, 135 => 61, 105 => 33, 101 => 32, 98 => 31, 96 => 30, 91 => 28, 86 => 25, 82 => 23, 79 => 15, 77 => 14, 74 => 13, 71 => 12, 68 => 9, 66 => 8, 61 => 5, 55 => 3, 53 => 2, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("<a
{% if productCategory.page() %}
href=\"{{ productCategory.page().url | trimUrl }}\"
{% endif %}
class=\"flex flex-col bg-white overflow-hidden rounded-md group
\"
>
{% if editmode and productCategory.page().url is not defined %}
{% embed 'app/editmodenotice.html.twig' %}
{% block title %} Er is nog geen pagina ingesteld voor dit product. {% endblock %}
{% endembed %}
{% endif %}
<div class=\"relative text-center\">
{% if productCategory.renderThumbnail is defined %}
{{ productCategory.renderThumbnail('product-category-thumbnail', {
'pictureAttributes': {
'class': 'block lg:w-full aspect-[16/9]'
},
'imgAttributes': {
'class': 'object-cov er object-center w-full h-full',
},
})|raw }}
{% endif %}
</div>
<div class=\"flex flex-col h-full justify-between px-6 py-4 w-full\">
<h3 class=\"mb-0 text-lg font-bold group-hover:text-blue\">
{{ productCategory.name ?: productCategory.key }}
</h3>
{% if productCategory.getUsps() | default([]) | length > 0 %}
<ul class=\"my-8 h-full\">
{% for usp in productCategory.getUsps() %}
<li class=\"mb-4 flex flex-row gap-2\">
<svg class=\"mt-2 min-w-[16px]\" xmlns=\"http://www.w3.org/2000/svg\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16px\"
height=\"11.4288571px\" viewBox=\"0 0 16 11.4288571\"
version=\"1.1\">
<g id=\"post-detail\" stroke=\"none\" stroke-width=\"1\"
fill=\"none\" fill-rule=\"evenodd\">
<g id=\"coolworld-post-detail-vd-1504-v03\"
transform=\"translate(-339.999886, -3485.999977)\"
fill=\"#01B902\">
<g id=\"toegepaste-producten\"
transform=\"translate(0.000000, 3083.000000)\">
<g id=\"Group-6\"
transform=\"translate(316.000000, 60.000000)\">
<g id=\"Group-4\"
transform=\"translate(0.000000, 85.000000)\">
<g id=\"icons/ui/check-circle\"
transform=\"translate(23.999886, 257.999977)\">
<path
d=\"M14.384,0 L16,1.616 L11.6251429,5.99085714 L6.52228571,11.0937143 C6.07657143,11.5405714 5.35314286,11.5405714 4.90742857,11.0937143 L4.90628571,11.0937143 L0,6.18742857 L1.616,4.57142857 L5.71428571,8.66971429 L14.384,0 Z\"
id=\"Fill-1\"/>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>
{{ usp.usp_title.getData() }}
</li>
{% endfor %}
</ul>
{% endif %}
<button class=\"button button__primary button--block button--no-padding\">
{{ 'view.product' | trans }}
</button>
</div>
</a>", "areas/product-category-cards-brick/partials/category-card.html.twig", "/home/forge/testing.coolworld.ptchr.dev/templates/areas/product-category-cards-brick/partials/category-card.html.twig");
}
public function checkSecurity()
{
static $tags = ["extends" => 9];
static $filters = [];
static $functions = [];
try {
$this->sandbox->checkSecurity(
['extends'],
[],
[],
$this->source
);
} 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;
}
}
}