var/cache/dev/twig/f8/f8c6bb2849bc3b5d523274af145f1d4b.php line 53

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* Recipes/allrecipes.html.twig */
  16. class __TwigTemplate_4736e7fa83905997485fc2f4989169d2 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'content' => [$this'block_content'],
  29.         ];
  30.     }
  31.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  32.     {
  33.         // line 1
  34.         return "layout/layout.html.twig";
  35.     }
  36.     protected function doDisplay(array $context, array $blocks = []): iterable
  37.     {
  38.         $macros $this->macros;
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Recipes/allrecipes.html.twig"));
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Recipes/allrecipes.html.twig"));
  43.         $this->parent $this->loadTemplate("layout/layout.html.twig""Recipes/allrecipes.html.twig"1);
  44.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 2
  51.     /**
  52.      * @return iterable<null|scalar|\Stringable>
  53.      */
  54.     public function block_content(array $context, array $blocks = []): iterable
  55.     {
  56.         $macros $this->macros;
  57.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  58.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  59.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  60.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""content"));
  61.         // line 3
  62.         yield "\t";
  63.         yield $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Recipes\\RecipesController::advancefilterBlock"));
  64.         yield "
  65. \t<!--Start Breadcrumbs-->
  66. \t<div class=\"breadcrumb-holder\">
  67. \t\t<ol class=\"breadcrumb\">
  68. \t\t\t<li class=\"breadcrumb-item\">
  69. \t\t\t\t<a href=\"/";
  70.         // line 8
  71.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse8), "locale", [], "any"falsefalsefalse8), "html"nulltrue);
  72.         yield "\">";
  73.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Home"), "html"nulltrue);
  74.         yield "</a>
  75. \t\t\t</li>
  76. \t\t\t<li class=\"breadcrumb-item\">
  77. \t\t\t\t<a href=\"/";
  78.         // line 11
  79.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse11), "locale", [], "any"falsefalsefalse11), "html"nulltrue);
  80.         yield "/recipes\">";
  81.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("recipes"), "html"nulltrue);
  82.         yield "</a>
  83. \t\t\t</li>
  84. \t\t\t<li class=\"breadcrumb-item active\" aria-current=\"page\">";
  85.         // line 13
  86.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("All Recipes "), "html"nulltrue);
  87.         yield "</li>
  88. \t\t</ol>
  89. \t</div>
  90. \t<!--End Breadcrumbs-->
  91. \t<!--Start Featured Recipes Section-->
  92. \t<section class=\"featured-recipes-section inner-featured-recipe all-recipes-load-more-section\">
  93. \t\t<div class=\"container container-sm\">
  94. \t\t\t<h2 class=\"heading\">";
  95.         // line 20
  96.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("All Recipes "), "html"nulltrue);
  97.         yield "</h2>
  98. \t\t\t<div class=\"featured-recipes grid-system all-slides-recipes\">
  99. \t\t\t\t<div class=\"slide-grid new_div\" id=\"object-list\">
  100. \t\t\t\t\t";
  101.         // line 23
  102.         $context['_parent'] = $context;
  103.         $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); })()));
  104.         $context['loop'] = [
  105.           'parent' => $context['_parent'],
  106.           'index0' => 0,
  107.           'index'  => 1,
  108.           'first'  => true,
  109.         ];
  110.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  111.             $length count($context['_seq']);
  112.             $context['loop']['revindex0'] = $length 1;
  113.             $context['loop']['revindex'] = $length;
  114.             $context['loop']['length'] = $length;
  115.             $context['loop']['last'] = === $length;
  116.         }
  117.         foreach ($context['_seq'] as $context["_key"] => $context["recipe"]) {
  118.             // line 24
  119.             yield "\t\t\t\t\t\t";
  120.             if ($context["recipe"]) {
  121.                 // line 25
  122.                 yield "\t\t\t\t\t\t\t";
  123.                 yield Twig\Extension\CoreExtension::include($this->env$context"Recipes/recipe-card-blue.html.twig", ["recipe" => $context["recipe"]]);
  124.                 yield "
  125. \t\t\t\t\t\t";
  126.             }
  127.             // line 27
  128.             yield "\t\t\t\t\t";
  129.             ++$context['loop']['index0'];
  130.             ++$context['loop']['index'];
  131.             $context['loop']['first'] = false;
  132.             if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  133.                 --$context['loop']['revindex0'];
  134.                 --$context['loop']['revindex'];
  135.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  136.             }
  137.         }
  138.         $_parent $context['_parent'];
  139.         unset($context['_seq'], $context['_key'], $context['recipe'], $context['_parent'], $context['loop']);
  140.         $context array_intersect_key($context$_parent) + $_parent;
  141.         // line 28
  142.         yield "\t\t\t\t</div>
  143. \t\t\t\t<div class=\"load-more\" id=\"load-more-btn\" data-url=\"";
  144.         // line 29
  145.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse29), "pathInfo", [], "any"falsefalsefalse29), "html"nulltrue);
  146.         yield "\">
  147. \t\t\t\t\t<span class=\"btn btn-custom btn-p-outline-blue\" id=\"load-more\" >";
  148.         // line 30
  149.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Load more"), "html"nulltrue);
  150.         yield "</span>
  151. \t\t\t\t</div>
  152. \t\t\t</div>
  153. \t\t</div>
  154. \t</section>
  155. \t";
  156.         // line 35
  157.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::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"falsefalsefalse35), "locale", [], "any"falsefalsefalse35) == "ar")) {
  158.             // line 36
  159.             yield "\t\t";
  160.             $context["topMenu"] = "/en/all-recipes";
  161.             // line 37
  162.             yield "\t";
  163.         } else {
  164.             // line 38
  165.             yield "\t\t";
  166.             $context["topMenu"] = "/ar/all-recipes";
  167.             // line 39
  168.             yield "\t";
  169.         }
  170.         // line 40
  171.         yield "\t<!--End Featured Recipes Section-->
  172. \t<script>
  173. \t\t\$(document).ready(function () {
  174. \t\t\tvar page = 2;
  175. \t\t\t\$('#load-more-btn').click(function () {
  176. \t\t\t\tlet postUrl = \$(this).data('url');
  177. \t\t\t\t\$.ajax({
  178. \t\t\t\t\turl: postUrl  + '?page=' + page,
  179. \t\t\t\t\ttype: 'GET',
  180. \t\t\t\t\tbeforeSend: function () {
  181. \t\t\t\t\t\t\$('#load-more').addClass('btn-load');
  182. \t\t\t\t\t},
  183. \t\t\t\t\tcomplete: function () {
  184. \t\t\t\t\t\t\$('#load-more').removeClass('btn-load');
  185. \t\t\t\t\t},
  186. \t\t\t\t\tsuccess: function (response) {
  187. \t\t\t\t\t\t\$('#object-list').append(response.html);
  188. \t\t\t\t\t\tif (! response.showLoadMoreButton) {
  189. \t\t\t\t\t\t\t\$('#load-more').hide();
  190. \t\t\t\t\t\t}
  191. \t\t\t\t\t\tpage++;
  192. \t\t\t\t\t}
  193. \t\t\t\t});
  194. \t\t\t});
  195. \t\t});
  196. \t\tvar _TopMenuLink = \"";
  197.         // line 66
  198.         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"nulltrue);
  199.         yield "\";
  200. \t</script>
  201. ";
  202.         
  203.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  204.         
  205.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  206.         yield from [];
  207.     }
  208.     /**
  209.      * @codeCoverageIgnore
  210.      */
  211.     public function getTemplateName(): string
  212.     {
  213.         return "Recipes/allrecipes.html.twig";
  214.     }
  215.     /**
  216.      * @codeCoverageIgnore
  217.      */
  218.     public function isTraitable(): bool
  219.     {
  220.         return false;
  221.     }
  222.     /**
  223.      * @codeCoverageIgnore
  224.      */
  225.     public function getDebugInfo(): array
  226.     {
  227.         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,);
  228.     }
  229.     public function getSourceContext(): Source
  230.     {
  231.         return new Source("{% extends \"layout/layout.html.twig\" %}
  232. {% block content %}
  233. \t{{ render(controller('App\\\\Controller\\\\Recipes\\\\RecipesController::advancefilterBlock')) }}
  234. \t<!--Start Breadcrumbs-->
  235. \t<div class=\"breadcrumb-holder\">
  236. \t\t<ol class=\"breadcrumb\">
  237. \t\t\t<li class=\"breadcrumb-item\">
  238. \t\t\t\t<a href=\"/{{app.request.locale}}\">{{\"Home\"|trans }}</a>
  239. \t\t\t</li>
  240. \t\t\t<li class=\"breadcrumb-item\">
  241. \t\t\t\t<a href=\"/{{app.request.locale}}/recipes\">{{\"recipes\"|trans }}</a>
  242. \t\t\t</li>
  243. \t\t\t<li class=\"breadcrumb-item active\" aria-current=\"page\">{{'All Recipes '|trans}}</li>
  244. \t\t</ol>
  245. \t</div>
  246. \t<!--End Breadcrumbs-->
  247. \t<!--Start Featured Recipes Section-->
  248. \t<section class=\"featured-recipes-section inner-featured-recipe all-recipes-load-more-section\">
  249. \t\t<div class=\"container container-sm\">
  250. \t\t\t<h2 class=\"heading\">{{'All Recipes '|trans}}</h2>
  251. \t\t\t<div class=\"featured-recipes grid-system all-slides-recipes\">
  252. \t\t\t\t<div class=\"slide-grid new_div\" id=\"object-list\">
  253. \t\t\t\t\t{% for recipe in recipes %}
  254. \t\t\t\t\t\t{% if recipe %}
  255. \t\t\t\t\t\t\t{{ include('Recipes/recipe-card-blue.html.twig', { 'recipe': recipe }) }}
  256. \t\t\t\t\t\t{% endif %}
  257. \t\t\t\t\t{% endfor %}
  258. \t\t\t\t</div>
  259. \t\t\t\t<div class=\"load-more\" id=\"load-more-btn\" data-url=\"{{app.request.pathInfo}}\">
  260. \t\t\t\t\t<span class=\"btn btn-custom btn-p-outline-blue\" id=\"load-more\" >{{'Load more'|trans}}</span>
  261. \t\t\t\t</div>
  262. \t\t\t</div>
  263. \t\t</div>
  264. \t</section>
  265. \t{% if (app.request.locale =='ar') %}
  266. \t\t{% set topMenu =\"/en/all-recipes\" %}
  267. \t{% else %}
  268. \t\t{% set topMenu =\"/ar/all-recipes\" %}
  269. \t{% endif %}
  270. \t<!--End Featured Recipes Section-->
  271. \t<script>
  272. \t\t\$(document).ready(function () {
  273. \t\t\tvar page = 2;
  274. \t\t\t\$('#load-more-btn').click(function () {
  275. \t\t\t\tlet postUrl = \$(this).data('url');
  276. \t\t\t\t\$.ajax({
  277. \t\t\t\t\turl: postUrl  + '?page=' + page,
  278. \t\t\t\t\ttype: 'GET',
  279. \t\t\t\t\tbeforeSend: function () {
  280. \t\t\t\t\t\t\$('#load-more').addClass('btn-load');
  281. \t\t\t\t\t},
  282. \t\t\t\t\tcomplete: function () {
  283. \t\t\t\t\t\t\$('#load-more').removeClass('btn-load');
  284. \t\t\t\t\t},
  285. \t\t\t\t\tsuccess: function (response) {
  286. \t\t\t\t\t\t\$('#object-list').append(response.html);
  287. \t\t\t\t\t\tif (! response.showLoadMoreButton) {
  288. \t\t\t\t\t\t\t\$('#load-more').hide();
  289. \t\t\t\t\t\t}
  290. \t\t\t\t\t\tpage++;
  291. \t\t\t\t\t}
  292. \t\t\t\t});
  293. \t\t\t});
  294. \t\t});
  295. \t\tvar _TopMenuLink = \"{{ topMenu }}\";
  296. \t</script>
  297. {% endblock %}
  298. ""Recipes/allrecipes.html.twig""/var/www/vhosts/centric.ae/gcs.centric.ae/templates/Recipes/allrecipes.html.twig");
  299.     }
  300. }