var/cache/dev/twig/e6/e6b8b9c1f922a2f708505b18ccacedad.php line 55

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\Sandbox\SecurityNotAllowedTestError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. use Twig\TemplateWrapper;
  16. /* city/index.html.twig */
  17. class __TwigTemplate_b09c33537a20056555ea66ac8bd1a5c7 extends Template
  18. {
  19. private Source $source;
  20. /**
  21. * @var array<string, Template>
  22. */
  23. private array $macros = [];
  24. public function __construct(Environment $env)
  25. {
  26. parent::__construct($env);
  27. $this->source = $this->getSourceContext();
  28. $this->blocks = [
  29. 'title' => [$this, 'block_title'],
  30. 'body' => [$this, 'block_body'],
  31. ];
  32. }
  33. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  34. {
  35. // line 1
  36. return "base.html.twig";
  37. }
  38. protected function doDisplay(array $context, array $blocks = []): iterable
  39. {
  40. $macros = $this->macros;
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "city/index.html.twig"));
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "city/index.html.twig"));
  45. $this->parent = $this->load("base.html.twig", 1);
  46. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  47. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49. }
  50. // line 3
  51. /**
  52. * @return iterable<null|scalar|\Stringable>
  53. */
  54. public function block_title(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", "title"));
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  60. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  61. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("City index", [], "messages");
  62. yield " ";
  63. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  64. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  65. yield from [];
  66. }
  67. // line 5
  68. /**
  69. * @return iterable<null|scalar|\Stringable>
  70. */
  71. public function block_body(array $context, array $blocks = []): iterable
  72. {
  73. $macros = $this->macros;
  74. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  75. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  76. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  77. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  78. // line 6
  79. yield " <h1>";
  80. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("City index", [], "messages");
  81. yield "</h1>
  82. <div class=\x27table-scrollable\x27>
  83. <table>
  84. <thead>
  85. <tr>
  86. <th>";
  87. // line 13
  88. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Id", [], "messages");
  89. yield "</th>
  90. <th>";
  91. // line 14
  92. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Name", [], "messages");
  93. yield "</th>
  94. <th>";
  95. // line 15
  96. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Description", [], "messages");
  97. yield "</th>
  98. <th>";
  99. // line 16
  100. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("actions", [], "messages");
  101. yield "</th>
  102. </tr>
  103. </thead>
  104. <tbody>
  105. ";
  106. // line 20
  107. $context['_parent'] = $context;
  108. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["cities"]) || array_key_exists("cities", $context) ? $context["cities"] : (function () { throw new RuntimeError('Variable "cities" does not exist.', 20, $this->source); })()));
  109. $context['_iterated'] = false;
  110. foreach ($context['_seq'] as $context["_key"] => $context["city"]) {
  111. // line 21
  112. yield " <tr>
  113. <td>";
  114. // line 22
  115. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["city"], "id", [], "any", false, false, false, 22), "html", null, true);
  116. yield "</td>
  117. <td>";
  118. // line 23
  119. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["city"], "name", [], "any", false, false, false, 23), "html", null, true);
  120. yield "</td>
  121. <td>";
  122. // line 24
  123. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["city"], "description", [], "any", false, false, false, 24), "html", null, true);
  124. yield "</td>
  125. <td>
  126. <a href=\"";
  127. // line 26
  128. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["city"], "id", [], "any", false, false, false, 26)]), "html", null, true);
  129. yield "\">";
  130. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("show", [], "messages");
  131. yield "</a>
  132. ";
  133. // line 27
  134. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_HABITECH")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  135. // line 28
  136. yield "
  137. <a href=\"";
  138. // line 29
  139. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["city"], "id", [], "any", false, false, false, 29)]), "html", null, true);
  140. yield "\">";
  141. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("edit", [], "messages");
  142. yield "</a>
  143. ";
  144. }
  145. // line 31
  146. yield " </td>
  147. </tr>
  148. ";
  149. $context['_iterated'] = true;
  150. }
  151. // line 33
  152. if (!$context['_iterated']) {
  153. // line 34
  154. yield " <tr>
  155. <td colspan=\"5\">";
  156. // line 35
  157. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("no records found", [], "messages");
  158. yield "</td>
  159. </tr>
  160. ";
  161. }
  162. $_parent = $context['_parent'];
  163. unset($context['_seq'], $context['_key'], $context['city'], $context['_parent'], $context['_iterated']);
  164. $context = array_intersect_key($context, $_parent);
  165. $context += $_parent;
  166. // line 38
  167. yield " </tbody>
  168. </table>
  169. </div>
  170. ";
  171. // line 41
  172. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_HABITECH")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  173. // line 42
  174. yield "
  175. <a href=\"";
  176. // line 43
  177. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("city_new");
  178. yield "\">";
  179. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Create new", [], "messages");
  180. yield "</a>
  181. ";
  182. }
  183. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  184. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  185. yield from [];
  186. }
  187. /**
  188. * @codeCoverageIgnore
  189. */
  190. public function getTemplateName(): string
  191. {
  192. return "city/index.html.twig";
  193. }
  194. /**
  195. * @codeCoverageIgnore
  196. */
  197. public function isTraitable(): bool
  198. {
  199. return false;
  200. }
  201. /**
  202. * @codeCoverageIgnore
  203. */
  204. public function getDebugInfo(): array
  205. {
  206. return array ( 202 => 43, 199 => 42, 197 => 41, 192 => 38, 182 => 35, 179 => 34, 177 => 33, 171 => 31, 164 => 29, 161 => 28, 159 => 27, 153 => 26, 148 => 24, 144 => 23, 140 => 22, 137 => 21, 132 => 20, 125 => 16, 121 => 15, 117 => 14, 113 => 13, 102 => 6, 89 => 5, 65 => 3, 42 => 1,);
  207. }
  208. public function getSourceContext(): Source
  209. {
  210. return new Source("{% extends \x27base.html.twig\x27 %}
  211. {% block title %}{% trans %}City index{% endtrans %} {% endblock %}
  212. {% block body %}
  213. <h1>{% trans %}City index{% endtrans %}</h1>
  214. <div class=\x27table-scrollable\x27>
  215. <table>
  216. <thead>
  217. <tr>
  218. <th>{% trans %}Id{% endtrans %}</th>
  219. <th>{% trans %}Name{% endtrans %}</th>
  220. <th>{% trans %}Description{% endtrans %}</th>
  221. <th>{% trans %}actions{% endtrans %}</th>
  222. </tr>
  223. </thead>
  224. <tbody>
  225. {% for city in cities %}
  226. <tr>
  227. <td>{{ city.id }}</td>
  228. <td>{{ city.name }}</td>
  229. <td>{{ city.description }}</td>
  230. <td>
  231. <a href=\"{{ path(\x27city_show\x27, {\x27id\x27: city.id}) }}\">{% trans %}show{% endtrans %}</a>
  232. {% if is_granted(\x27ROLE_HABITECH\x27) %}
  233. <a href=\"{{ path(\x27city_edit\x27, {\x27id\x27: city.id}) }}\">{% trans %}edit{% endtrans %}</a>
  234. {% endif %}
  235. </td>
  236. </tr>
  237. {% else %}
  238. <tr>
  239. <td colspan=\"5\">{% trans %} no records found{% endtrans %}</td>
  240. </tr>
  241. {% endfor %}
  242. </tbody>
  243. </table>
  244. </div>
  245. {% if is_granted(\x27ROLE_HABITECH\x27) %}
  246. <a href=\"{{ path(\x27city_new\x27) }}\">{% trans %} Create new {% endtrans %}</a>
  247. {% endif %}
  248. {% endblock %}
  249. ", "city/index.html.twig", "/var/www/vhosts/habitechsolutions.cm/birth.habitechsolutions.cm/templates/city/index.html.twig");
  250. }
  251. }