var/cache/dev/twig/f0/f0394d062cb23c109a865cead69ce254.php line 34
<?phpuse 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;/* Default/counter.html.twig */class __TwigTemplate_69b758af1f9326a72cd5f6d2fc341896 extends Template{private $source;private $macros = [];public function __construct(Environment $env){parent::__construct($env);$this->source = $this->getSourceContext();$this->parent = false;$this->blocks = [];$macros["_self"] = $this->macros["_self"] = $this;}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", "Default/counter.html.twig"));$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Default/counter.html.twig"));// line 10echo "";// line 11$context["expanded"] = (((array_key_exists("expanded", $context) && (isset($context["expanded"]) || array_key_exists("expanded", $context) ? $context["expanded"] : (function () { throw new RuntimeError('Variable "expanded" does not exist.', 11, $this->source); })()))) ? (true) : (false));// line 12echo "";// line 13if ((array_key_exists("offset", $context) && array_key_exists("count", $context))) {// line 14echo " ";if (((isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 14, $this->source); })()) > 0)) {// line 15echo " <div class='flex row space counters-box middle'>";// line 17$context["route"] = twig_get_attribute($this->env, $this->source, 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.', 17, $this->source); })()), "request", [], "any", false, false, false, 17), "attributes", [], "any", false, false, false, 17), "get", [0 => "_route"], "method", false, false, false, 17);// line 18echo " ";$context["pageRoute"] = ((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 18, $this->source); })()) . "-page");// line 19echo " ";$context["route"] = (($this->extensions['App\Twig\OSExtension']->isRoute((isset($context["pageRoute"]) || array_key_exists("pageRoute", $context) ? $context["pageRoute"] : (function () { throw new RuntimeError('Variable "pageRoute" does not exist.', 19, $this->source); })()))) ? ((isset($context["pageRoute"]) || array_key_exists("pageRoute", $context) ? $context["pageRoute"] : (function () { throw new RuntimeError('Variable "pageRoute" does not exist.', 19, $this->source); })())) : ((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 19, $this->source); })())));// line 20echo "";// line 21if ( !array_key_exists("table_limit", $context)) {// line 22echo " ";$context["table_limit"] = 20;// line 23echo " ";}// line 24echo "";// line 25$context["limit"] = (((isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 25, $this->source); })()) + 1) * (isset($context["table_limit"]) || array_key_exists("table_limit", $context) ? $context["table_limit"] : (function () { throw new RuntimeError('Variable "table_limit" does not exist.', 25, $this->source); })()));// line 26echo " ";$context["currentPath"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(twig_get_attribute($this->env, $this->source, 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.', 26, $this->source); })()), "request", [], "any", false, false, false, 26), "attributes", [], "any", false, false, false, 26), "get", [0 => "_route"], "method", false, false, false, 26), twig_get_attribute($this->env, $this->source, 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.', 26, $this->source); })()), "request", [], "any", false, false, false, 26), "attributes", [], "any", false, false, false, 26), "get", [0 => "_route_params"], "method", false, false, false, 26));// line 27echo "";// line 28if (((isset($context["limit"]) || array_key_exists("limit", $context) ? $context["limit"] : (function () { throw new RuntimeError('Variable "limit" does not exist.', 28, $this->source); })()) > (isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 28, $this->source); })()))) {echo " ";$context["limit"] = (isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 28, $this->source); })());echo " ";}// line 29echo "";// line 30if ( !(isset($context["expanded"]) || array_key_exists("expanded", $context) ? $context["expanded"] : (function () { throw new RuntimeError('Variable "expanded" does not exist.', 30, $this->source); })())) {// line 31echo " <div class='right-20 adapt p'>\t\t\t<label>Résultats : </label>\t\t\t<b class=\"\">";// line 33echo twig_escape_filter($this->env, (((isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 33, $this->source); })()) * (isset($context["table_limit"]) || array_key_exists("table_limit", $context) ? $context["table_limit"] : (function () { throw new RuntimeError('Variable "table_limit" does not exist.', 33, $this->source); })())) + 1), "html", null, true);echo " - ";echo twig_escape_filter($this->env, (isset($context["limit"]) || array_key_exists("limit", $context) ? $context["limit"] : (function () { throw new RuntimeError('Variable "limit" does not exist.', 33, $this->source); })()), "html", null, true);echo " sur ";echo twig_escape_filter($this->env, (isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 33, $this->source); })()), "html", null, true);echo "</b>\t\t</div>";}// line 36echo "";// line 37$context["link"] = false;// line 38echo " ";if (((((isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 38, $this->source); })()) * (isset($context["table_limit"]) || array_key_exists("table_limit", $context) ? $context["table_limit"] : (function () { throw new RuntimeError('Variable "table_limit" does not exist.', 38, $this->source); })())) + 1) > 1)) {// line 39echo " ";if ((array_key_exists("params", $context) && twig_length_filter($this->env, (isset($context["params"]) || array_key_exists("params", $context) ? $context["params"] : (function () { throw new RuntimeError('Variable "params" does not exist.', 39, $this->source); })())))) {// line 40echo " ";$context["params"] = twig_array_merge((isset($context["params"]) || array_key_exists("params", $context) ? $context["params"] : (function () { throw new RuntimeError('Variable "params" does not exist.', 40, $this->source); })()), ["offset" => (isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 40, $this->source); })())]);// line 41echo " ";$context["link"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 41, $this->source); })()), (isset($context["params"]) || array_key_exists("params", $context) ? $context["params"] : (function () { throw new RuntimeError('Variable "params" does not exist.', 41, $this->source); })()));// line 42echo " ";} elseif ((array_key_exists("cat", $context) && (isset($context["cat"]) || array_key_exists("cat", $context) ? $context["cat"] : (function () { throw new RuntimeError('Variable "cat" does not exist.', 42, $this->source); })()))) {// line 43echo " ";$context["link"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 43, $this->source); })()), ["cat" => (isset($context["cat"]) || array_key_exists("cat", $context) ? $context["cat"] : (function () { throw new RuntimeError('Variable "cat" does not exist.', 43, $this->source); })()), "offset" => (isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 43, $this->source); })())]);// line 44echo " ";} else {// line 45echo " ";$context["link"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 45, $this->source); })()), ["offset" => (isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 45, $this->source); })())]);// line 46echo " ";}// line 47echo " ";}// line 48echo "";// line 49echo twig_call_macro($macros["_self"], "macro_btn", [(isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 49, $this->source); })()), (isset($context["expanded"]) || array_key_exists("expanded", $context) ? $context["expanded"] : (function () { throw new RuntimeError('Variable "expanded" does not exist.', 49, $this->source); })()), "arrow-left", "Page précédente", "Précédent", "adapt right-5"], 49, $context, $this->getSourceContext());echo "";// line 51if ((isset($context["expanded"]) || array_key_exists("expanded", $context) ? $context["expanded"] : (function () { throw new RuntimeError('Variable "expanded" does not exist.', 51, $this->source); })())) {// line 52echo " <b class='btn btn-success small trans'>";echo twig_escape_filter($this->env, (((isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 52, $this->source); })()) * (isset($context["table_limit"]) || array_key_exists("table_limit", $context) ? $context["table_limit"] : (function () { throw new RuntimeError('Variable "table_limit" does not exist.', 52, $this->source); })())) + 1), "html", null, true);echo " - ";echo twig_escape_filter($this->env, (isset($context["limit"]) || array_key_exists("limit", $context) ? $context["limit"] : (function () { throw new RuntimeError('Variable "limit" does not exist.', 52, $this->source); })()), "html", null, true);echo " sur ";echo twig_escape_filter($this->env, (isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 52, $this->source); })()), "html", null, true);echo "</b>";}// line 54echo "";// line 55$context["link"] = false;// line 56echo " ";if (((isset($context["limit"]) || array_key_exists("limit", $context) ? $context["limit"] : (function () { throw new RuntimeError('Variable "limit" does not exist.', 56, $this->source); })()) < (isset($context["count"]) || array_key_exists("count", $context) ? $context["count"] : (function () { throw new RuntimeError('Variable "count" does not exist.', 56, $this->source); })()))) {// line 57echo " ";if ((array_key_exists("params", $context) && twig_length_filter($this->env, (isset($context["params"]) || array_key_exists("params", $context) ? $context["params"] : (function () { throw new RuntimeError('Variable "params" does not exist.', 57, $this->source); })())))) {// line 58echo " ";$context["params"] = twig_array_merge((isset($context["params"]) || array_key_exists("params", $context) ? $context["params"] : (function () { throw new RuntimeError('Variable "params" does not exist.', 58, $this->source); })()), ["offset" => ((isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 58, $this->source); })()) + 2)]);// line 59echo " ";$context["link"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 59, $this->source); })()), (isset($context["params"]) || array_key_exists("params", $context) ? $context["params"] : (function () { throw new RuntimeError('Variable "params" does not exist.', 59, $this->source); })()));// line 60echo " ";} elseif ((array_key_exists("cat", $context) && (isset($context["cat"]) || array_key_exists("cat", $context) ? $context["cat"] : (function () { throw new RuntimeError('Variable "cat" does not exist.', 60, $this->source); })()))) {// line 61echo " ";$context["link"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 61, $this->source); })()), ["cat" => (isset($context["cat"]) || array_key_exists("cat", $context) ? $context["cat"] : (function () { throw new RuntimeError('Variable "cat" does not exist.', 61, $this->source); })()), "offset" => ((isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 61, $this->source); })()) + 2)]);// line 62echo " ";} else {// line 63echo " ";$context["link"] = $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl((isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 63, $this->source); })()), ["offset" => ((isset($context["offset"]) || array_key_exists("offset", $context) ? $context["offset"] : (function () { throw new RuntimeError('Variable "offset" does not exist.', 63, $this->source); })()) + 2)]);// line 64echo " ";}// line 65echo " ";}// line 66echo " ";echo twig_call_macro($macros["_self"], "macro_btn", [(isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 66, $this->source); })()), (isset($context["expanded"]) || array_key_exists("expanded", $context) ? $context["expanded"] : (function () { throw new RuntimeError('Variable "expanded" does not exist.', 66, $this->source); })()), "arrow-right", "Page suivante", "Suivant", "adapt left-5 reverse"], 66, $context, $this->getSourceContext());echo "</div>";} else {// line 69echo " <label>Aucune donnée trouvée</label>";}}$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);}// line 1public function macro_btn($__link__ = null, $__expanded__ = null, $__icon__ = null, $__title__ = null, $__text__ = null, $__class__ = null, ...$__varargs__){$macros = $this->macros;$context = $this->env->mergeGlobals(["link" => $__link__,"expanded" => $__expanded__,"icon" => $__icon__,"title" => $__title__,"text" => $__text__,"class" => $__class__,"varargs" => $__varargs__,]);$blocks = [];ob_start();try {$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "btn"));$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "btn"));// line 2echo "<a ";if ((isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 2, $this->source); })())) {echo " href='";echo twig_escape_filter($this->env, (isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 2, $this->source); })()), "html", null, true);echo "' ";}// line 3echo "\tclass='";echo (((isset($context["expanded"]) || array_key_exists("expanded", $context) ? $context["expanded"] : (function () { throw new RuntimeError('Variable "expanded" does not exist.', 3, $this->source); })())) ? ("flex row middle vt-5-in hz-15-in border border-success success p upper") : ("icon border small radius-50 iflex col middle"));echo " ";echo (( !(isset($context["link"]) || array_key_exists("link", $context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.', 3, $this->source); })())) ? ("disabled") : (""));echo " ";echo twig_escape_filter($this->env, (isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 3, $this->source); })()), "html", null, true);echo "' title='";echo twig_escape_filter($this->env, (isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 3, $this->source); })()), "html", null, true);echo "'>\t<i class='icon contain min ";// line 4echo twig_escape_filter($this->env, (isset($context["icon"]) || array_key_exists("icon", $context) ? $context["icon"] : (function () { throw new RuntimeError('Variable "icon" does not exist.', 4, $this->source); })()), "html", null, true);echo "'></i>\t";// line 5if (((isset($context["expanded"]) || array_key_exists("expanded", $context) ? $context["expanded"] : (function () { throw new RuntimeError('Variable "expanded" does not exist.', 5, $this->source); })()) && !$this->env->getFunction('isMobile')->getCallable()())) {// line 6echo "\t<span> ";echo twig_escape_filter($this->env, (isset($context["text"]) || array_key_exists("text", $context) ? $context["text"] : (function () { throw new RuntimeError('Variable "text" does not exist.', 6, $this->source); })()), "html", null, true);echo "</span>\t";}// line 8echo "</a>";$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());} finally {ob_end_clean();}}public function getTemplateName(){return "Default/counter.html.twig";}public function isTraitable(){return false;}public function getDebugInfo(){return array ( 280 => 8, 274 => 6, 272 => 5, 268 => 4, 257 => 3, 250 => 2, 226 => 1, 213 => 69, 206 => 66, 203 => 65, 200 => 64, 197 => 63, 194 => 62, 191 => 61, 188 => 60, 185 => 59, 182 => 58, 179 => 57, 176 => 56, 174 => 55, 171 => 54, 161 => 52, 159 => 51, 154 => 49, 151 => 48, 148 => 47, 145 => 46, 142 => 45, 139 => 44, 136 => 43, 133 => 42, 130 => 41, 127 => 40, 124 => 39, 121 => 38, 119 => 37, 116 => 36, 106 => 33, 102 => 31, 100 => 30, 97 => 29, 91 => 28, 88 => 27, 85 => 26, 83 => 25, 80 => 24, 77 => 23, 74 => 22, 72 => 21, 69 => 20, 66 => 19, 63 => 18, 61 => 17, 57 => 15, 54 => 14, 52 => 13, 49 => 12, 47 => 11, 44 => 10,);}public function getSourceContext(){return new Source("{% macro btn(link, expanded, icon, title, text, class) %}<a {% if link %} href='{{link}}' {% endif %}\tclass='{{ expanded ? \"flex row middle vt-5-in hz-15-in border border-success success p upper\" : \"icon border small radius-50 iflex col middle\" }} {{not link ? \"disabled\"}} {{class}}' title='{{title}}'>\t<i class='icon contain min {{icon}}'></i>\t{% if expanded and not isMobile() %}\t<span> {{text}}</span>\t{% endif %}</a>{% endmacro %}{% set expanded = expanded is defined and expanded ? true : false %}{% if offset is defined and count is defined %}{% if count > 0 %}<div class='flex row space counters-box middle'>{% set route = app.request.attributes.get('_route') %}{% set pageRoute = route~'-page' %}{% set route = isRoute(pageRoute) ? pageRoute : route %}{% if table_limit is not defined %}{% set table_limit = 20 %}{% endif %}{% set limit = (offset+1)*table_limit %}{% set currentPath = path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')) %}{% if limit > count %} {% set limit = count %} {% endif %}{% if not expanded %}<div class='right-20 adapt p'>\t\t\t<label>Résultats : </label>\t\t\t<b class=\"\">{{ (offset*table_limit)+1 }} - {{ limit }} sur {{ count }}</b>\t\t</div>{% endif %}{% set link = false %}{% if (offset*table_limit)+1 > 1 %}{% if params is defined and params|length %}{% set params = params|merge({'offset':offset}) %}{% set link = url(route,params) %}{% elseif cat is defined and cat %}{% set link = url(route,{'cat':cat,'offset':offset}) %}{% else %}{% set link = url(route,{'offset':offset}) %}{% endif %}{% endif %}{{ _self.btn(link, expanded, \"arrow-left\", \"Page précédente\", \"Précédent\", \"adapt right-5\") }}{% if expanded %}<b class='btn btn-success small trans'>{{ (offset*table_limit)+1 }} - {{ limit }} sur {{ count }}</b>{% endif %}{% set link = false %}{% if limit < count %}{% if params is defined and params|length %}{% set params = params|merge({'offset':offset+2}) %}{% set link = url(route,params) %}{% elseif cat is defined and cat %}{% set link = url(route,{'cat':cat,'offset':offset+2}) %}{% else %}{% set link = url(route,{'offset':offset+2}) %}{% endif %}{% endif %}{{ _self.btn(link, expanded, \"arrow-right\", \"Page suivante\", \"Suivant\", \"adapt left-5 reverse\") }}</div>{% else %}<label>Aucune donnée trouvée</label>{% endif %}{% endif %}", "Default/counter.html.twig", "/home/olasoftnka/asin/templates/Default/counter.html.twig");}}