var/cache/dev/twig/99/9945b4342b6a2e65eab2e1bf89674383.php line 146

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. /* areas/cards/view.html.twig */
  16. class __TwigTemplate_b8e731084cf567a55c2f47fba2de7f44 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->parent = false;
  28. $this->blocks = [
  29. ];
  30. $this->sandbox = $this->extensions[SandboxExtension::class];
  31. $this->checkSecurity();
  32. }
  33. protected function doDisplay(array $context, array $blocks = []): iterable
  34. {
  35. $macros = $this->macros;
  36. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/cards/view.html.twig"));
  38. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/cards/view.html.twig"));
  40. // line 1
  41. $context["headlineTag"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "headline1", ["store" => [["none", "none"], ["h1", "H1"], ["h2", "H2"], ["h3", "H3"], ["h4", "H4"], ["h5", "H5"], ["h6", "H6"]], "defaultValue" => "", "reload" => true]);
  42. // line 14
  43. yield "
  44. ";
  45. // line 15
  46. if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 15, $this->source); })()), "isEmpty", [], "method", false, false, true, 15)) {
  47. // line 16
  48. yield " ";
  49. CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 16, $this->source); })()), "setDataFromResource", ["h2"], "method", false, false, true, 16);
  50. }
  51. // line 18
  52. yield "
  53. ";
  54. // line 19
  55. $context["headline1"] = (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 19, $this->source); })()), "data", [], "any", false, false, true, 19) != "none")) ? ($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 19, $this->source); })()), "data", [], "any", false, false, true, 19), 19, $this->source)) : ("span"));
  56. // line 20
  57. $context["headline2"] = (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 20, $this->source); })()), "data", [], "any", false, false, true, 20) != "none")) ? ((("</" . $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 20, $this->source); })()), "data", [], "any", false, false, true, 20), 20, $this->source)) . ">")) : ("</span>"));
  58. // line 21
  59. yield "
  60. ";
  61. // line 23
  62. if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 23, $this->source); })())) {
  63. // line 24
  64. yield " <div class=\"edit-box\">
  65. <h1>KONFIGURATIONEN FÜR DEN AREABRICK:</h1>
  66. <div class=\"flex gap-20\">
  67. <div class=\"content flex column gap-20\">
  68. <div class=\"content-box flex gap-20\">
  69. <div class=\"item\">
  70. <p class=\"edit-p\">Abstand nach unten wählen:</p>
  71. ";
  72. // line 31
  73. yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "MarginBottom", ["reload" => true, "store" => [["regular", "Normal"], ["half", "1/2"], ["small", "1/4"], ["zero", "kein Abstand"]], "defaultValue" => "regular"]);
  74. // line 40
  75. yield "
  76. </div>
  77. <div class=\"item\">
  78. <p class=\"edit-p\">Titel-Typ definieren:</p>
  79. ";
  80. // line 45
  81. yield $this->sandbox->ensureToStringAllowed((isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 45, $this->source); })()), 45, $this->source);
  82. yield "
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. ";
  89. }
  90. // line 52
  91. yield "<section class=\"cards mulden-teaser ";
  92. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "MarginBottom"), "getData", [], "method", false, false, true, 52), 52, $this->source), "html", null, true);
  93. yield "\">
  94. <div class=\"container\">
  95. <div class=\"content-container\">
  96. ";
  97. // line 56
  98. if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 56, $this->source); })())) {
  99. // line 57
  100. yield " <span class=\"mulden-title\">";
  101. yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "headline", ["nl2br" => true, "height" => 200, "placeholder" => "HAUPT ÜBERSCHRIFT FÜR DIESE AREA"]);
  102. // line 61
  103. yield "
  104. </span>
  105. ";
  106. } elseif (( ! // line 63
  107. (isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 63, $this->source); })()) && !CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "headline"), "isEmpty", [], "method", false, false, true, 63))) {
  108. // line 64
  109. yield " <";
  110. yield $this->sandbox->ensureToStringAllowed((isset($context["headline1"]) || array_key_exists("headline1", $context) ? $context["headline1"] : (function () { throw new RuntimeError('Variable "headline1" does not exist.', 64, $this->source); })()), 64, $this->source);
  111. yield " class=\"mulden-title\">
  112. ";
  113. // line 65
  114. yield Twig\Extension\CoreExtension::nl2br($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "headline"), "getData", [], "method", false, false, true, 65), 65, $this->source), "html", null, true));
  115. yield "
  116. ";
  117. // line 66
  118. yield $this->sandbox->ensureToStringAllowed((isset($context["headline2"]) || array_key_exists("headline2", $context) ? $context["headline2"] : (function () { throw new RuntimeError('Variable "headline2" does not exist.', 66, $this->source); })()), 66, $this->source);
  119. yield "
  120. ";
  121. }
  122. // line 68
  123. yield "
  124. ";
  125. // line 69
  126. if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 69, $this->source); })())) {
  127. // line 70
  128. yield " ";
  129. yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "Teaser", ["title" => "Cards Objekte ablegen", "types" => ["object"], "subtypes" => ["object" => ["object"]], "classes" => ["Card"]]);
  130. // line 77
  131. yield "
  132. ";
  133. } elseif (( ! // line 78
  134. (isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 78, $this->source); })()) && !CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "Teaser"), "isEmpty", [], "method", false, false, true, 78))) {
  135. // line 79
  136. yield " ";
  137. $context['_parent'] = $context;
  138. $context['_seq'] = CoreExtension::ensureTraversable($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "Teaser"));
  139. $context['loop'] = [
  140. 'parent' => $context['_parent'],
  141. 'index0' => 0,
  142. 'index' => 1,
  143. 'first' => true,
  144. ];
  145. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  146. $length = count($context['_seq']);
  147. $context['loop']['revindex0'] = $length - 1;
  148. $context['loop']['revindex'] = $length;
  149. $context['loop']['length'] = $length;
  150. $context['loop']['last'] = 1 === $length;
  151. }
  152. foreach ($context['_seq'] as $context["_key"] => $context["teaser"]) {
  153. // line 80
  154. yield " <div class=\"teaser\">
  155. <div class=\"img-container\">
  156. ";
  157. // line 82
  158. yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "image", [], "any", false, false, true, 82), "thumbnail", ["MuldenTeaser"], "method", false, false, true, 82), "html", [], "any", false, false, true, 82), 82, $this->source);
  159. yield "
  160. </div>
  161. <div class=\"content\">
  162. <div class=\"headline\">
  163. ";
  164. // line 87
  165. yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "headline", [], "any", false, false, true, 87), 87, $this->source);
  166. yield "
  167. </div>
  168. <div class=\"text lauf\">
  169. ";
  170. // line 90
  171. yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "text", [], "any", false, false, true, 90), 90, $this->source);
  172. yield "
  173. </div>
  174. ";
  175. // line 93
  176. if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 93, $this->source); })())) {
  177. // line 94
  178. yield " <p class=\"card-link\" style=\"margin-bottom: 0;\">
  179. ";
  180. // line 95
  181. yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 95), 95, $this->source);
  182. yield "
  183. </p>
  184. ";
  185. } elseif (( ! // line 97
  186. (isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 97, $this->source); })()) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 97)))) {
  187. // line 98
  188. yield " <div class=\"btn secondary\">
  189. ";
  190. // line 99
  191. if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 99), "target", [], "any", false, false, true, 99)) {
  192. // line 100
  193. yield " ";
  194. $context["target"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 100), "target", [], "any", false, false, true, 100);
  195. // line 101
  196. yield " ";
  197. } else {
  198. // line 102
  199. yield " ";
  200. $context["target"] = "_self";
  201. // line 103
  202. yield " ";
  203. }
  204. // line 104
  205. yield " <a class=\"flex\" href=\"";
  206. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 104), "href", [], "any", false, false, true, 104), 104, $this->source), "html", null, true);
  207. yield "\" target=\"";
  208. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["target"]) || array_key_exists("target", $context) ? $context["target"] : (function () { throw new RuntimeError('Variable "target" does not exist.', 104, $this->source); })()), 104, $this->source), "html", null, true);
  209. yield "\">
  210. <span>";
  211. // line 105
  212. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 105), "getText", [], "method", false, false, true, 105), 105, $this->source), "html", null, true);
  213. yield "
  214. ";
  215. // line 114
  216. yield " </span>
  217. </a>
  218. <div class=\"button-shape\">
  219. ";
  220. // line 117
  221. yield Twig\Extension\CoreExtension::include($this->env, $context, "svg/button-shape.html.twig");
  222. yield "
  223. </div>
  224. </div>
  225. ";
  226. }
  227. // line 122
  228. yield " </div>
  229. </div>
  230. ";
  231. ++$context['loop']['index0'];
  232. ++$context['loop']['index'];
  233. $context['loop']['first'] = false;
  234. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  235. --$context['loop']['revindex0'];
  236. --$context['loop']['revindex'];
  237. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  238. }
  239. }
  240. $_parent = $context['_parent'];
  241. unset($context['_seq'], $context['_key'], $context['teaser'], $context['_parent'], $context['loop']);
  242. $context = array_intersect_key($context, $_parent) + $_parent;
  243. // line 126
  244. yield " ";
  245. }
  246. // line 127
  247. yield " </div>
  248. </div>
  249. </section>";
  250. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  251. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  252. yield from [];
  253. }
  254. /**
  255. * @codeCoverageIgnore
  256. */
  257. public function getTemplateName(): string
  258. {
  259. return "areas/cards/view.html.twig";
  260. }
  261. /**
  262. * @codeCoverageIgnore
  263. */
  264. public function isTraitable(): bool
  265. {
  266. return false;
  267. }
  268. /**
  269. * @codeCoverageIgnore
  270. */
  271. public function getDebugInfo(): array
  272. {
  273. return array ( 263 => 127, 260 => 126, 243 => 122, 235 => 117, 230 => 114, 226 => 105, 219 => 104, 216 => 103, 213 => 102, 210 => 101, 207 => 100, 205 => 99, 202 => 98, 200 => 97, 195 => 95, 192 => 94, 190 => 93, 184 => 90, 178 => 87, 170 => 82, 166 => 80, 148 => 79, 146 => 78, 143 => 77, 140 => 70, 138 => 69, 135 => 68, 130 => 66, 126 => 65, 121 => 64, 119 => 63, 115 => 61, 112 => 57, 110 => 56, 102 => 52, 92 => 45, 85 => 40, 83 => 31, 74 => 24, 72 => 23, 68 => 21, 66 => 20, 64 => 19, 61 => 18, 57 => 16, 55 => 15, 52 => 14, 50 => 1,);
  274. }
  275. public function getSourceContext(): Source
  276. {
  277. return new Source("{% set headlineTag = pimcore_select('headline1', {
  278. 'store': [
  279. ['none', 'none'],
  280. ['h1', 'H1'],
  281. ['h2', 'H2'],
  282. ['h3', 'H3'],
  283. ['h4', 'H4'],
  284. ['h5', 'H5'],
  285. ['h6', 'H6'],
  286. ],
  287. 'defaultValue': '',
  288. 'reload': true,
  289. }) %}
  290. {% if headlineTag.isEmpty() %}
  291. {% do headlineTag.setDataFromResource('h2') %}
  292. {% endif %}
  293. {% set headline1 = headlineTag.data != 'none' ? headlineTag.data|raw : 'span'|raw %}
  294. {% set headline2 = headlineTag.data != 'none' ? '</' ~ headlineTag.data|raw ~ '>' : '</span>'|raw %}
  295. {% if editmode %}
  296. <div class=\"edit-box\">
  297. <h1>KONFIGURATIONEN FÜR DEN AREABRICK:</h1>
  298. <div class=\"flex gap-20\">
  299. <div class=\"content flex column gap-20\">
  300. <div class=\"content-box flex gap-20\">
  301. <div class=\"item\">
  302. <p class=\"edit-p\">Abstand nach unten wählen:</p>
  303. {{ pimcore_select(\"MarginBottom\", {
  304. \"reload\": true,
  305. \"store\": [
  306. [\"regular\", \"Normal\"],
  307. [\"half\", \"1/2\"],
  308. [\"small\", \"1/4\"],
  309. [\"zero\", \"kein Abstand\"],
  310. ],
  311. \"defaultValue\" : \"regular\"
  312. }) }}
  313. </div>
  314. <div class=\"item\">
  315. <p class=\"edit-p\">Titel-Typ definieren:</p>
  316. {{ headlineTag|raw }}
  317. </div>
  318. </div>
  319. </div>
  320. </div>
  321. </div>
  322. {% endif %}
  323. <section class=\"cards mulden-teaser {{ pimcore_select('MarginBottom').getData() }}\">
  324. <div class=\"container\">
  325. <div class=\"content-container\">
  326. {% if editmode %}
  327. <span class=\"mulden-title\">{{ pimcore_textarea(\"headline\",{
  328. \"nl2br\": true,
  329. \"height\": 200,
  330. \"placeholder\": \"HAUPT ÜBERSCHRIFT FÜR DIESE AREA\"
  331. }) }}
  332. </span>
  333. {% elseif not editmode and not pimcore_textarea('headline').isEmpty() %}
  334. <{{headline1|raw}} class=\"mulden-title\">
  335. {{ pimcore_textarea('headline').getData() | nl2br }}
  336. {{ headline2|raw }}
  337. {% endif %}
  338. {% if editmode %}
  339. {{ pimcore_relations(\"Teaser\", {
  340. \"title\": \"Cards Objekte ablegen\",
  341. \"types\": [\"object\"],
  342. \"subtypes\": {
  343. \"object\": [\"object\"]
  344. },
  345. \"classes\": [\"Card\"]
  346. }) }}
  347. {% elseif not editmode and not pimcore_relations(\"Teaser\").isEmpty() %}
  348. {% for teaser in pimcore_relations(\"Teaser\") %}
  349. <div class=\"teaser\">
  350. <div class=\"img-container\">
  351. {{ teaser.image.thumbnail('MuldenTeaser').html | raw }}
  352. </div>
  353. <div class=\"content\">
  354. <div class=\"headline\">
  355. {{ teaser.headline | raw }}
  356. </div>
  357. <div class=\"text lauf\">
  358. {{ teaser.text | raw }}
  359. </div>
  360. {% if editmode %}
  361. <p class=\"card-link\" style=\"margin-bottom: 0;\">
  362. {{ teaser.link | raw }}
  363. </p>
  364. {% elseif not editmode and not teaser.link is empty %}
  365. <div class=\"btn secondary\">
  366. {% if teaser.link.target %}
  367. {% set target = teaser.link.target %}
  368. {% else %}
  369. {% set target = '_self' %}
  370. {% endif %}
  371. <a class=\"flex\" href=\"{{ teaser.link.href }}\" target=\"{{ target }}\">
  372. <span>{{ teaser.link.getText() }}
  373. {# <svg width=\"15.708\" height=\"10.709\" viewBox=\"0 0 15.708 10.709\">
  374. <g transform=\"translate(0 0.354)\">
  375. <g transform=\"translate(0)\">
  376. <path class=\"line\" d=\"M7.5,18h15\" transform=\"translate(-7.5 -13)\" fill=\"none\" stroke=\"#fff\" stroke-linejoin=\"round\" stroke-width=\"1\"/>
  377. <path class=\"arrow\" d=\"M18,7.5l5.026,5L18,17.5\" transform=\"translate(-8.027 -7.5)\" fill=\"none\" stroke=\"#fff\" stroke-width=\"1\"/>
  378. </g>
  379. </g>
  380. </svg> #}
  381. </span>
  382. </a>
  383. <div class=\"button-shape\">
  384. {{include('svg/button-shape.html.twig')}}
  385. </div>
  386. </div>
  387. {% endif %}
  388. </div>
  389. </div>
  390. {% endfor %}
  391. {% endif %}
  392. </div>
  393. </div>
  394. </section>", "areas/cards/view.html.twig", "/home/httpd/vhosts/annavation.a4interactive.ch/httpdocs/dev/templates/areas/cards/view.html.twig");
  395. }
  396. public function checkSecurity()
  397. {
  398. static $tags = ["set" => 1, "if" => 15, "do" => 16, "for" => 79];
  399. static $filters = ["raw" => 19, "escape" => 52, "nl2br" => 65];
  400. static $functions = ["pimcore_select" => 1, "pimcore_textarea" => 57, "pimcore_relations" => 70, "include" => 117];
  401. try {
  402. $this->sandbox->checkSecurity(
  403. ['set', 'if', 'do', 'for'],
  404. ['raw', 'escape', 'nl2br'],
  405. ['pimcore_select', 'pimcore_textarea', 'pimcore_relations', 'include'],
  406. $this->source
  407. );
  408. } catch (SecurityError $e) {
  409. $e->setSourceContext($this->source);
  410. if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  411. $e->setTemplateLine($tags[$e->getTagName()]);
  412. } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  413. $e->setTemplateLine($filters[$e->getFilterName()]);
  414. } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  415. $e->setTemplateLine($functions[$e->getFunctionName()]);
  416. }
  417. throw $e;
  418. }
  419. }
  420. }