var/cache/dev/twig/2c/2c8bdadcae5649eda19d0c34454c09be.php line 58

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. /* product/frontEnd/category/index.html.twig */
  16. class __TwigTemplate_520c84f72923c1efe8dde50040d1b673 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. // line 3
  28. $_trait_0 = $this->load("@PNSeo/FrontEnd/seo.html.twig", 3);
  29. if (!$_trait_0->unwrap()->isTraitable()) {
  30. throw new RuntimeError('Template "'."@PNSeo/FrontEnd/seo.html.twig".'" cannot be used as a trait.', 3, $this->source);
  31. }
  32. $_trait_0_blocks = $_trait_0->unwrap()->getBlocks();
  33. $this->traits = $_trait_0_blocks;
  34. $this->blocks = array_merge(
  35. $this->traits,
  36. [
  37. 'criticalCSS' => [$this, 'block_criticalCSS'],
  38. 'stylesheets' => [$this, 'block_stylesheets'],
  39. 'content' => [$this, 'block_content'],
  40. 'javascripts' => [$this, 'block_javascripts'],
  41. ]
  42. );
  43. }
  44. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  45. {
  46. // line 1
  47. return "fe/base.html.twig";
  48. }
  49. protected function doDisplay(array $context, array $blocks = []): iterable
  50. {
  51. $macros = $this->macros;
  52. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "product/frontEnd/category/index.html.twig"));
  54. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "product/frontEnd/category/index.html.twig"));
  56. // line 2
  57. $context["seo"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["seoPage"]) || array_key_exists("seoPage", $context) ? $context["seoPage"] : (function () { throw new RuntimeError('Variable "seoPage" does not exist.', 2, $this->source); })()), "seo", [], "any", false, false, false, 2);
  58. // line 4
  59. $macros["͜macros"] = $this->macros["͜macros"] = $this->load("fe/macros.html.twig", 4)->unwrap();
  60. // line 1
  61. $this->parent = $this->load("fe/base.html.twig", 1);
  62. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  63. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  64. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  65. }
  66. // line 7
  67. /**
  68. * @return iterable<null|scalar|\Stringable>
  69. */
  70. public function block_criticalCSS(array $context, array $blocks = []): iterable
  71. {
  72. $macros = $this->macros;
  73. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  74. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "criticalCSS"));
  75. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  76. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "criticalCSS"));
  77. // line 8
  78. yield " ";
  79. yield from $this->load("product/frontEnd/category/_critical_css.css.twig", 8)->unwrap()->yield($context);
  80. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  81. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  82. yield from [];
  83. }
  84. // line 11
  85. /**
  86. * @return iterable<null|scalar|\Stringable>
  87. */
  88. public function block_stylesheets(array $context, array $blocks = []): iterable
  89. {
  90. $macros = $this->macros;
  91. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  92. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  93. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  94. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  95. // line 12
  96. yield " ";
  97. yield from $this->yieldParentBlock("stylesheets", $context, $blocks);
  98. yield "
  99. ";
  100. // line 13
  101. yield $macros["͜macros"]->getTemplateForMacro("macro_assetCSS", $context, 13, $this->getSourceContext())->macro_assetCSS(...[$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("pages-assets/categories/categories.styles.css")]);
  102. yield "
  103. ";
  104. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  105. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  106. yield from [];
  107. }
  108. // line 16
  109. /**
  110. * @return iterable<null|scalar|\Stringable>
  111. */
  112. public function block_content(array $context, array $blocks = []): iterable
  113. {
  114. $macros = $this->macros;
  115. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  116. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  117. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  118. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  119. // line 17
  120. yield " ";
  121. $context["pageTitle"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["seoPage"]) || array_key_exists("seoPage", $context) ? $context["seoPage"] : (function () { throw new RuntimeError('Variable "seoPage" does not exist.', 17, $this->source); })()), "seo", [], "any", false, false, false, 17), "title", [], "any", false, false, false, 17);
  122. // line 18
  123. yield "
  124. ";
  125. // line 19
  126. $context["coverPhoto"] = null;
  127. // line 20
  128. yield " ";
  129. if (( !Twig\Extension\CoreExtension::testEmpty((isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 20, $this->source); })())) && CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 20, $this->source); })()), "post", [], "any", false, false, false, 20), "imageByType", [Twig\Extension\CoreExtension::constant("\\App\\MediaBundle\\Entity\\Image::TYPE_COVER_PHOTO")], "method", false, false, false, 20))) {
  130. // line 21
  131. yield " ";
  132. $context["coverPhoto"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 21, $this->source); })()), "post", [], "any", false, false, false, 21), "imageByType", [Twig\Extension\CoreExtension::constant("\\App\\MediaBundle\\Entity\\Image::TYPE_COVER_PHOTO")], "method", false, false, false, 21), "assetPath", [], "any", false, false, false, 21));
  133. // line 22
  134. yield " ";
  135. }
  136. // line 23
  137. yield "
  138. ";
  139. // line 24
  140. $context["pageDescription"] = null;
  141. // line 25
  142. yield " ";
  143. if ((($tmp = !Twig\Extension\CoreExtension::testEmpty((isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 25, $this->source); })()))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  144. // line 26
  145. yield " ";
  146. $context["pageTitle"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 26, $this->source); })()), "title", [], "any", false, false, false, 26);
  147. // line 27
  148. yield " ";
  149. $context["pageDescription"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["parentCategory"]) || array_key_exists("parentCategory", $context) ? $context["parentCategory"] : (function () { throw new RuntimeError('Variable "parentCategory" does not exist.', 27, $this->source); })()), "post", [], "any", false, false, false, 27), "content", [], "any", false, false, false, 27), "brief", [], "any", false, false, false, 27);
  150. // line 28
  151. yield " ";
  152. }
  153. // line 29
  154. yield "
  155. ";
  156. // line 30
  157. yield from $this->load("fe/_pages_header.html.twig", 30)->unwrap()->yield(CoreExtension::merge($context, ["pageTitle" => (isset($context["pageTitle"]) || array_key_exists("pageTitle", $context) ? $context["pageTitle"] : (function () { throw new RuntimeError('Variable "pageTitle" does not exist.', 30, $this->source); })()), "description" => (isset($context["pageDescription"]) || array_key_exists("pageDescription", $context) ? $context["pageDescription"] : (function () { throw new RuntimeError('Variable "pageDescription" does not exist.', 30, $this->source); })()), "image" => (isset($context["coverPhoto"]) || array_key_exists("coverPhoto", $context) ? $context["coverPhoto"] : (function () { throw new RuntimeError('Variable "coverPhoto" does not exist.', 30, $this->source); })()), "marginBottomZero" => true]));
  158. // line 31
  159. yield "
  160. <div class=\"l-lazy-section ui-lazy-section loading\"
  161. data-l-lazy-section=\"categories\"
  162. data-l-lazy-section-type=\"simple\"
  163. data-l-lazy-section-url=\"";
  164. // line 35
  165. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath(CoreExtension::getAttribute($this->env, $this->source, 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), "attributes", [], "any", false, false, false, 35), "get", ["_route"], "method", false, false, false, 35), Twig\Extension\CoreExtension::merge(CoreExtension::getAttribute($this->env, $this->source, 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), "attributes", [], "any", false, false, false, 35), "get", ["_route_params"], "method", false, false, false, 35), ["content" => true])), "html", null, true);
  166. yield "\"
  167. ></div>
  168. ";
  169. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  170. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  171. yield from [];
  172. }
  173. // line 40
  174. /**
  175. * @return iterable<null|scalar|\Stringable>
  176. */
  177. public function block_javascripts(array $context, array $blocks = []): iterable
  178. {
  179. $macros = $this->macros;
  180. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  181. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  182. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  183. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  184. // line 41
  185. yield " ";
  186. yield from $this->yieldParentBlock("javascripts", $context, $blocks);
  187. yield "
  188. ";
  189. // line 42
  190. yield $macros["͜macros"]->getTemplateForMacro("macro_assetCSS", $context, 42, $this->getSourceContext())->macro_assetCSS(...[$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("pages-assets/categories/categories.lazy.styles.css"), true]);
  191. yield "
  192. ";
  193. // line 44
  194. yield $macros["͜macros"]->getTemplateForMacro("macro_assetJS", $context, 44, $this->getSourceContext())->macro_assetJS(...[$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("pages-assets/categories/categories.js")]);
  195. yield "
  196. ";
  197. // line 45
  198. yield $macros["͜macros"]->getTemplateForMacro("macro_assetJS", $context, 45, $this->getSourceContext())->macro_assetJS(...[$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("pages-assets/categories/categories.lazy.js"), true]);
  199. yield "
  200. ";
  201. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  202. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  203. yield from [];
  204. }
  205. /**
  206. * @codeCoverageIgnore
  207. */
  208. public function getTemplateName(): string
  209. {
  210. return "product/frontEnd/category/index.html.twig";
  211. }
  212. /**
  213. * @codeCoverageIgnore
  214. */
  215. public function isTraitable(): bool
  216. {
  217. return false;
  218. }
  219. /**
  220. * @codeCoverageIgnore
  221. */
  222. public function getDebugInfo(): array
  223. {
  224. return array ( 239 => 45, 235 => 44, 230 => 42, 225 => 41, 212 => 40, 197 => 35, 191 => 31, 189 => 30, 186 => 29, 183 => 28, 180 => 27, 177 => 26, 174 => 25, 172 => 24, 169 => 23, 166 => 22, 163 => 21, 160 => 20, 158 => 19, 155 => 18, 152 => 17, 139 => 16, 126 => 13, 121 => 12, 108 => 11, 96 => 8, 83 => 7, 72 => 1, 70 => 4, 68 => 2, 55 => 1, 33 => 3,);
  225. }
  226. public function getSourceContext(): Source
  227. {
  228. return new Source("{% extends 'fe/base.html.twig' %}
  229. {% set seo = seoPage.seo %}
  230. {% use '@PNSeo/FrontEnd/seo.html.twig' %}
  231. {% import 'fe/macros.html.twig' as macros %}
  232. {% block criticalCSS %}
  233. {% include \"product/frontEnd/category/_critical_css.css.twig\" %}
  234. {% endblock %}
  235. {% block stylesheets %}
  236. {{ parent() }}
  237. {{ macros.assetCSS(asset('pages-assets/categories/categories.styles.css')) }}
  238. {% endblock %}
  239. {% block content %}
  240. {% set pageTitle = seoPage.seo.title %}
  241. {% set coverPhoto = null %}
  242. {% if parentCategory is not empty and parentCategory.post.imageByType(constant(\"\\\\App\\\\MediaBundle\\\\Entity\\\\Image::TYPE_COVER_PHOTO\")) %}
  243. {% set coverPhoto = asset(parentCategory.post.imageByType(constant(\"\\\\App\\\\MediaBundle\\\\Entity\\\\Image::TYPE_COVER_PHOTO\")).assetPath) %}
  244. {% endif %}
  245. {% set pageDescription = null %}
  246. {% if parentCategory is not empty %}
  247. {% set pageTitle = parentCategory.title %}
  248. {% set pageDescription = parentCategory.post.content.brief %}
  249. {% endif %}
  250. {% include \"fe/_pages_header.html.twig\" with {\"pageTitle\": pageTitle, description: pageDescription, \"image\" : coverPhoto, \"marginBottomZero\": true } %}
  251. <div class=\"l-lazy-section ui-lazy-section loading\"
  252. data-l-lazy-section=\"categories\"
  253. data-l-lazy-section-type=\"simple\"
  254. data-l-lazy-section-url=\"{{ path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')|merge({'content':true})) }}\"
  255. ></div>
  256. {% endblock %}
  257. {% block javascripts %}
  258. {{ parent() }}
  259. {{ macros.assetCSS(asset('pages-assets/categories/categories.lazy.styles.css'), true) }}
  260. {{ macros.assetJS(asset('pages-assets/categories/categories.js')) }}
  261. {{ macros.assetJS(asset('pages-assets/categories/categories.lazy.js'), true) }}
  262. {% endblock %}
  263. ", "product/frontEnd/category/index.html.twig", "/var/www/esorus-shop/templates/product/frontEnd/category/index.html.twig");
  264. }
  265. }