<?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;
/* @SyliusShop/Product/Show/_associations.html.twig */
class __TwigTemplate_737c91a01cd7346e0b1177908b120cb6 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "@SyliusShop/Product/Show/_associations.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/Show/_associations.html.twig"));
// line 1
$macros["headers"] = $this->macros["headers"] = $this->loadTemplate("@SyliusShop/Common/Macro/sectionHeaders.html.twig", "@SyliusShop/Product/Show/_associations.html.twig", 1)->unwrap();
// line 2
echo "
";
// line 3
$context["displayNews"] = 0;
// line 4
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 4, $this->source); })()), "associations", [], "any", false, false, false, 4));
foreach ($context['_seq'] as $context["_key"] => $context["association"]) {
// line 5
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["association"], "getType", [], "method", false, false, false, 5), "getCode", [], "method", false, false, false, 5) == "related_products")) {
// line 6
echo " <div class=\"max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk\">
<div class=\"border rounded-10 bg-white p-3 p-xl-4\">
";
// line 8
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_product_association_show", ["productId" => twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 8, $this->source); })()), "id", [], "any", false, false, false, 8), "id" => twig_get_attribute($this->env, $this->source, $context["association"], "id", [], "any", false, false, false, 8), "template" => "@SyliusShop/Product/Show/_association.html.twig"]));
echo "
</div>
</div>
";
} else {
// line 12
echo " ";
$context["displayNews"] = 1;
// line 13
echo " ";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['association'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 15
echo "
";
// line 16
if (((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 16, $this->source); })()), "associations", [], "any", false, false, false, 16)) == 0) || ((isset($context["displayNews"]) || array_key_exists("displayNews", $context) ? $context["displayNews"] : (function () { throw new RuntimeError('Variable "displayNews" does not exist.', 16, $this->source); })()) == 1))) {
// line 17
echo " ";
$context["countNbProduct_a_completer"] = $this->extensions['App\Twig\Extensions\Parameter\ParameterExtension']->getParameter("nb_product_to_complete");
// line 18
echo " ";
if ( !(isset($context["countNbProduct_a_completer"]) || array_key_exists("countNbProduct_a_completer", $context) ? $context["countNbProduct_a_completer"] : (function () { throw new RuntimeError('Variable "countNbProduct_a_completer" does not exist.', 18, $this->source); })())) {
// line 19
echo " ";
$context["countNbProduct_a_completer"] = 4;
// line 20
echo " ";
}
// line 21
echo " <div class=\"max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk\">
<div class=\"border rounded-10 bg-white p-3 p-xl-4\">
";
// line 23
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("sylius_shop_partial_product_index_latest", ["count" => (isset($context["countNbProduct_a_completer"]) || array_key_exists("countNbProduct_a_completer", $context) ? $context["countNbProduct_a_completer"] : (function () { throw new RuntimeError('Variable "countNbProduct_a_completer" does not exist.', 23, $this->source); })()), "template" => "@SyliusShop/Product/_horizontalListWithHeader.html.twig"]));
echo "
</div>
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Show/_associations.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 99 => 23, 95 => 21, 92 => 20, 89 => 19, 86 => 18, 83 => 17, 81 => 16, 78 => 15, 71 => 13, 68 => 12, 61 => 8, 57 => 6, 54 => 5, 50 => 4, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% import '@SyliusShop/Common/Macro/sectionHeaders.html.twig' as headers %}
{% set displayNews = 0 %}
{% for association in product.associations %}
{% if association.getType().getCode() == \"related_products\"%}
<div class=\"max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk\">
<div class=\"border rounded-10 bg-white p-3 p-xl-4\">
{{ render(url('sylius_shop_partial_product_association_show', {'productId': product.id, 'id': association.id, 'template': '@SyliusShop/Product/Show/_association.html.twig'})) }}
</div>
</div>
{% else %}
{% set displayNews = 1 %}
{% endif %}
{% endfor %}
{% if (product.associations|length == 0) or (displayNews == 1) %}
{% set countNbProduct_a_completer = app_get_parameter('nb_product_to_complete') %}
{% if not countNbProduct_a_completer %}
{% set countNbProduct_a_completer = 4 %}
{% endif %}
<div class=\"max-container-6 mt-lg-5 mt-4 article-bottom top-index-slider-desk\">
<div class=\"border rounded-10 bg-white p-3 p-xl-4\">
{{ render(url('sylius_shop_partial_product_index_latest', {'count': countNbProduct_a_completer, 'template': '@SyliusShop/Product/_horizontalListWithHeader.html.twig'})) }}
</div>
</div>
{% endif %}
", "@SyliusShop/Product/Show/_associations.html.twig", "/var/www/html/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Show/_associations.html.twig");
}
}