<?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;
/* Recipes/allrecipes.html.twig */
class __TwigTemplate_4736e7fa83905997485fc2f4989169d2 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 = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "layout/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "Recipes/allrecipes.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Recipes/allrecipes.html.twig"));
$this->parent = $this->loadTemplate("layout/layout.html.twig", "Recipes/allrecipes.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$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 3
yield "\t";
yield $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Recipes\\RecipesController::advancefilterBlock"));
yield "
\t<!--Start Breadcrumbs-->
\t<div class=\"breadcrumb-holder\">
\t\t<ol class=\"breadcrumb\">
\t\t\t<li class=\"breadcrumb-item\">
\t\t\t\t<a href=\"/";
// line 8
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 8, $this->source); })()), "request", [], "any", false, false, false, 8), "locale", [], "any", false, false, false, 8), "html", null, true);
yield "\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Home"), "html", null, true);
yield "</a>
\t\t\t</li>
\t\t\t<li class=\"breadcrumb-item\">
\t\t\t\t<a href=\"/";
// line 11
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 11, $this->source); })()), "request", [], "any", false, false, false, 11), "locale", [], "any", false, false, false, 11), "html", null, true);
yield "/recipes\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("recipes"), "html", null, true);
yield "</a>
\t\t\t</li>
\t\t\t<li class=\"breadcrumb-item active\" aria-current=\"page\">";
// line 13
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("All Recipes "), "html", null, true);
yield "</li>
\t\t</ol>
\t</div>
\t<!--End Breadcrumbs-->
\t<!--Start Featured Recipes Section-->
\t<section class=\"featured-recipes-section inner-featured-recipe all-recipes-load-more-section\">
\t\t<div class=\"container container-sm\">
\t\t\t<h2 class=\"heading\">";
// line 20
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("All Recipes "), "html", null, true);
yield "</h2>
\t\t\t<div class=\"featured-recipes grid-system all-slides-recipes\">
\t\t\t\t<div class=\"slide-grid new_div\" id=\"object-list\">
\t\t\t\t\t";
// line 23
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["recipes"]) || array_key_exists("recipes", $context) ? $context["recipes"] : (function () { throw new RuntimeError('Variable "recipes" does not exist.', 23, $this->source); })()));
$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["recipe"]) {
// line 24
yield "\t\t\t\t\t\t";
if ($context["recipe"]) {
// line 25
yield "\t\t\t\t\t\t\t";
yield Twig\Extension\CoreExtension::include($this->env, $context, "Recipes/recipe-card-blue.html.twig", ["recipe" => $context["recipe"]]);
yield "
\t\t\t\t\t\t";
}
// line 27
yield "\t\t\t\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['recipe'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 28
yield "\t\t\t\t</div>
\t\t\t\t<div class=\"load-more\" id=\"load-more-btn\" data-url=\"";
// line 29
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 29, $this->source); })()), "request", [], "any", false, false, false, 29), "pathInfo", [], "any", false, false, false, 29), "html", null, true);
yield "\">
\t\t\t\t\t<span class=\"btn btn-custom btn-p-outline-blue\" id=\"load-more\" >";
// line 30
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Load more"), "html", null, true);
yield "</span>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</section>
\t";
// line 35
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 35, $this->source); })()), "request", [], "any", false, false, false, 35), "locale", [], "any", false, false, false, 35) == "ar")) {
// line 36
yield "\t\t";
$context["topMenu"] = "/en/all-recipes";
// line 37
yield "\t";
} else {
// line 38
yield "\t\t";
$context["topMenu"] = "/ar/all-recipes";
// line 39
yield "\t";
}
// line 40
yield "\t<!--End Featured Recipes Section-->
\t<script>
\t\t\$(document).ready(function () {
\t\t\tvar page = 2;
\t\t\t\$('#load-more-btn').click(function () {
\t\t\t\tlet postUrl = \$(this).data('url');
\t\t\t\t\$.ajax({
\t\t\t\t\turl: postUrl + '?page=' + page,
\t\t\t\t\ttype: 'GET',
\t\t\t\t\tbeforeSend: function () {
\t\t\t\t\t\t\$('#load-more').addClass('btn-load');
\t\t\t\t\t},
\t\t\t\t\tcomplete: function () {
\t\t\t\t\t\t\$('#load-more').removeClass('btn-load');
\t\t\t\t\t},
\t\t\t\t\tsuccess: function (response) {
\t\t\t\t\t\t\$('#object-list').append(response.html);
\t\t\t\t\t\tif (! response.showLoadMoreButton) {
\t\t\t\t\t\t\t\$('#load-more').hide();
\t\t\t\t\t\t}
\t\t\t\t\t\tpage++;
\t\t\t\t\t}
\t\t\t\t});
\t\t\t});
\t\t});
\t\tvar _TopMenuLink = \"";
// line 66
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["topMenu"]) || array_key_exists("topMenu", $context) ? $context["topMenu"] : (function () { throw new RuntimeError('Variable "topMenu" does not exist.', 66, $this->source); })()), "html", null, true);
yield "\";
\t</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "Recipes/allrecipes.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 213 => 66, 185 => 40, 182 => 39, 179 => 38, 176 => 37, 173 => 36, 171 => 35, 163 => 30, 159 => 29, 156 => 28, 142 => 27, 136 => 25, 133 => 24, 116 => 23, 110 => 20, 100 => 13, 93 => 11, 85 => 8, 76 => 3, 63 => 2, 40 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \"layout/layout.html.twig\" %}
{% block content %}
\t{{ render(controller('App\\\\Controller\\\\Recipes\\\\RecipesController::advancefilterBlock')) }}
\t<!--Start Breadcrumbs-->
\t<div class=\"breadcrumb-holder\">
\t\t<ol class=\"breadcrumb\">
\t\t\t<li class=\"breadcrumb-item\">
\t\t\t\t<a href=\"/{{app.request.locale}}\">{{\"Home\"|trans }}</a>
\t\t\t</li>
\t\t\t<li class=\"breadcrumb-item\">
\t\t\t\t<a href=\"/{{app.request.locale}}/recipes\">{{\"recipes\"|trans }}</a>
\t\t\t</li>
\t\t\t<li class=\"breadcrumb-item active\" aria-current=\"page\">{{'All Recipes '|trans}}</li>
\t\t</ol>
\t</div>
\t<!--End Breadcrumbs-->
\t<!--Start Featured Recipes Section-->
\t<section class=\"featured-recipes-section inner-featured-recipe all-recipes-load-more-section\">
\t\t<div class=\"container container-sm\">
\t\t\t<h2 class=\"heading\">{{'All Recipes '|trans}}</h2>
\t\t\t<div class=\"featured-recipes grid-system all-slides-recipes\">
\t\t\t\t<div class=\"slide-grid new_div\" id=\"object-list\">
\t\t\t\t\t{% for recipe in recipes %}
\t\t\t\t\t\t{% if recipe %}
\t\t\t\t\t\t\t{{ include('Recipes/recipe-card-blue.html.twig', { 'recipe': recipe }) }}
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t{% endfor %}
\t\t\t\t</div>
\t\t\t\t<div class=\"load-more\" id=\"load-more-btn\" data-url=\"{{app.request.pathInfo}}\">
\t\t\t\t\t<span class=\"btn btn-custom btn-p-outline-blue\" id=\"load-more\" >{{'Load more'|trans}}</span>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</section>
\t{% if (app.request.locale =='ar') %}
\t\t{% set topMenu =\"/en/all-recipes\" %}
\t{% else %}
\t\t{% set topMenu =\"/ar/all-recipes\" %}
\t{% endif %}
\t<!--End Featured Recipes Section-->
\t<script>
\t\t\$(document).ready(function () {
\t\t\tvar page = 2;
\t\t\t\$('#load-more-btn').click(function () {
\t\t\t\tlet postUrl = \$(this).data('url');
\t\t\t\t\$.ajax({
\t\t\t\t\turl: postUrl + '?page=' + page,
\t\t\t\t\ttype: 'GET',
\t\t\t\t\tbeforeSend: function () {
\t\t\t\t\t\t\$('#load-more').addClass('btn-load');
\t\t\t\t\t},
\t\t\t\t\tcomplete: function () {
\t\t\t\t\t\t\$('#load-more').removeClass('btn-load');
\t\t\t\t\t},
\t\t\t\t\tsuccess: function (response) {
\t\t\t\t\t\t\$('#object-list').append(response.html);
\t\t\t\t\t\tif (! response.showLoadMoreButton) {
\t\t\t\t\t\t\t\$('#load-more').hide();
\t\t\t\t\t\t}
\t\t\t\t\t\tpage++;
\t\t\t\t\t}
\t\t\t\t});
\t\t\t});
\t\t});
\t\tvar _TopMenuLink = \"{{ topMenu }}\";
\t</script>
{% endblock %}
", "Recipes/allrecipes.html.twig", "/var/www/vhosts/centric.ae/gcs.centric.ae/templates/Recipes/allrecipes.html.twig");
}
}