<?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/Index/_main.html.twig */
class __TwigTemplate_7d7ef42e040d166b0df07e599a5968ab 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/Index/_main.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/Index/_main.html.twig"));
// line 1
$macros["messages"] = $this->macros["messages"] = $this->loadTemplate("@SyliusShop/Common/Macro/messages.html.twig", "@SyliusShop/Product/Index/_main.html.twig", 1)->unwrap();
// line 2
$macros["pagination"] = $this->macros["pagination"] = $this->loadTemplate("@SyliusShop/Common/Macro/pagination.html.twig", "@SyliusShop/Product/Index/_main.html.twig", 2)->unwrap();
// line 3
echo "
";
// line 4
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["resources"]) || array_key_exists("resources", $context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.', 4, $this->source); })()), "data", [], "any", false, false, false, 4)) > 0)) {
// line 5
echo " <div class=\"categ-bottom\">
<div class=\"res-filtre\">
<strong class=\"nbre-article\">";
// line 7
echo twig_escape_filter($this->env, twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["resources"]) || array_key_exists("resources", $context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.', 7, $this->source); })()), "data", [], "any", false, false, false, 7)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("app.taxon.articles"), "html", null, true);
echo " </strong>
<span>Votre séléction :</span>
<span class=\"filtre\"><a href=\"#\">Halal</a></span><span class=\"filtre\"><a href=\"#\">test</a></span>
</div>
<div class=\"liste-articles\">
<div class=\"row-article clear-float\" ";
// line 13
echo $this->env->getFunction('sylius_test_html_attribute')->getCallable()("products");
echo ">
";
// line 15
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["resources"]) || array_key_exists("resources", $context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.', 15, $this->source); })()), "data", [], "any", false, false, false, 15));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
// line 16
echo " <div class=\"col-20-top\">
";
// line 17
$this->loadTemplate("@SyliusShop/Product/_box.html.twig", "@SyliusShop/Product/Index/_main.html.twig", 17)->display($context);
// line 18
echo " </div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 20
echo " </div>
</div>
</div>
";
// line 24
echo $this->extensions['Sylius\Bundle\UiBundle\Twig\TemplateEventExtension']->render("sylius.shop.product.index.before_pagination", ["products" => twig_get_attribute($this->env, $this->source, (isset($context["resources"]) || array_key_exists("resources", $context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.', 24, $this->source); })()), "data", [], "any", false, false, false, 24)]);
echo "
<div class=\"d-flex justify-content-end mt-3\">
";
// line 27
echo twig_call_macro($macros["pagination"], "macro_simple", [twig_get_attribute($this->env, $this->source, (isset($context["resources"]) || array_key_exists("resources", $context) ? $context["resources"] : (function () { throw new RuntimeError('Variable "resources" does not exist.', 27, $this->source); })()), "data", [], "any", false, false, false, 27)], 27, $context, $this->getSourceContext());
echo "
</div>
";
} else {
// line 30
echo " <div class=\"mt-3\">
";
// line 31
echo twig_call_macro($macros["messages"], "macro_info", ["sylius.ui.no_results_to_display"], 31, $context, $this->getSourceContext());
echo "
</div>
";
}
// line 33
echo "
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/Index/_main.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 136 => 33, 130 => 31, 127 => 30, 121 => 27, 115 => 24, 109 => 20, 94 => 18, 92 => 17, 89 => 16, 72 => 15, 67 => 13, 56 => 7, 52 => 5, 50 => 4, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% import '@SyliusShop/Common/Macro/messages.html.twig' as messages %}
{% import '@SyliusShop/Common/Macro/pagination.html.twig' as pagination %}
{% if resources.data|length > 0 %}
<div class=\"categ-bottom\">
<div class=\"res-filtre\">
<strong class=\"nbre-article\">{{resources.data|length}} {{'app.taxon.articles' |trans}} </strong>
<span>Votre séléction :</span>
<span class=\"filtre\"><a href=\"#\">Halal</a></span><span class=\"filtre\"><a href=\"#\">test</a></span>
</div>
<div class=\"liste-articles\">
<div class=\"row-article clear-float\" {{ sylius_test_html_attribute('products') }}>
{% for product in resources.data %}
<div class=\"col-20-top\">
{% include '@SyliusShop/Product/_box.html.twig' %}
</div>
{% endfor %}
</div>
</div>
</div>
{{ sylius_template_event('sylius.shop.product.index.before_pagination', {'products': resources.data}) }}
<div class=\"d-flex justify-content-end mt-3\">
{{ pagination.simple(resources.data) }}
</div>
{% else %}
<div class=\"mt-3\">
{{ messages.info('sylius.ui.no_results_to_display') }}
</div>
{% endif %}
", "@SyliusShop/Product/Index/_main.html.twig", "/var/www/html/themes/BootstrapTheme/templates/bundles/SyliusShopBundle/Product/Index/_main.html.twig");
}
}