var/cache/test/twig/c7/c7ccc212d0668ab003b6cf1b91befb29.php line 33

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @ui2022/table--search.html.twig */
  14. class __TwigTemplate_255b11e947085bc72e5721a8f7d96540 extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ui2022/table--search.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ui2022/table--search.html.twig"));
  33.         // line 2
  34.         $context["form"] = twig_get_attribute($this->env$this->source, (isset($context["_args"]) || array_key_exists("_args"$context) ? $context["_args"] : (function () { throw new RuntimeError('Variable "_args" does not exist.'2$this->source); })()), "form", [], "any"falsefalsefalse2);
  35.         // line 3
  36.         $context["headers"] = twig_get_attribute($this->env$this->source, (isset($context["_args"]) || array_key_exists("_args"$context) ? $context["_args"] : (function () { throw new RuntimeError('Variable "_args" does not exist.'3$this->source); })()), "headers", [], "any"falsefalsefalse3);
  37.         // line 4
  38.         $context["pagination"] = ((twig_get_attribute($this->env$this->source, ($context["_args"] ?? null), "pagination", [], "any"truetruefalse4)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["_args"] ?? null), "pagination", [], "any"falsefalsefalse4), null)) : (null));
  39.         // line 5
  40.         echo "
  41. ";
  42.         // line 7
  43.         $context["headers"] = twig_array_map($this->env, (isset($context["headers"]) || array_key_exists("headers"$context) ? $context["headers"] : (function () { throw new RuntimeError('Variable "headers" does not exist.'7$this->source); })()), function ($__header__) use ($context$macros) { $context["header"] = $__header__; return twig_array_merge((isset($context["header"]) || array_key_exists("header"$context) ? $context["header"] : (function () { throw new RuntimeError('Variable "header" does not exist.'7$this->source); })()), ["sort" => (((twig_get_attribute($this->env$this->source,         // line 8
  44. ($context["header"] ?? null), "sort", [], "any"truetruefalse8) && twig_in_filter(twig_get_attribute($this->env$this->source, (isset($context["header"]) || array_key_exists("header"$context) ? $context["header"] : (function () { throw new RuntimeError('Variable "header" does not exist.'8$this->source); })()), "sort", [], "any"falsefalsefalse8), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'8$this->source); })()), "vars", [], "any"falsefalsefalse8), "sorts", [], "any"falsefalsefalse8)))) ? (["key" => twig_get_attribute($this->env$this->source,         // line 9
  45. (isset($context["header"]) || array_key_exists("header"$context) ? $context["header"] : (function () { throw new RuntimeError('Variable "header" does not exist.'9$this->source); })()), "sort", [], "any"falsefalsefalse9), "dir" => (((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,         // line 10
  46. (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'10$this->source); })()), "sort", [], "any"falsefalsefalse10), "vars", [], "any"falsefalsefalse10), "value", [], "any"falsefalsefalse10) === twig_get_attribute($this->env$this->source, (isset($context["header"]) || array_key_exists("header"$context) ? $context["header"] : (function () { throw new RuntimeError('Variable "header" does not exist.'10$this->source); })()), "sort", [], "any"falsefalsefalse10))) ? ($this->extensions['App\Twig\Extension\MiscellaneousExtension']->dir_flip(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'10$this->source); })()), "direction", [], "any"falsefalsefalse10), "vars", [], "any"falsefalsefalse10), "value", [], "any"falsefalsefalse10))) : (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'10$this->source); })()), "vars", [], "any"falsefalsefalse10), "dirs", [], "any"falsefalsefalse10), twig_get_attribute($this->env$this->source, (isset($context["header"]) || array_key_exists("header"$context) ? $context["header"] : (function () { throw new RuntimeError('Variable "header" does not exist.'10$this->source); })()), "sort", [], "any"falsefalsefalse10), [], "array"falsefalsefalse10))), "active" => (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,         // line 11
  47. (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'11$this->source); })()), "sort", [], "any"falsefalsefalse11), "vars", [], "any"falsefalsefalse11), "value", [], "any"falsefalsefalse11) === twig_get_attribute($this->env$this->source, (isset($context["header"]) || array_key_exists("header"$context) ? $context["header"] : (function () { throw new RuntimeError('Variable "header" does not exist.'11$this->source); })()), "sort", [], "any"falsefalsefalse11))]) : (null))]); });
  48.         // line 14
  49.         echo "
  50. ";
  51.         // line 16
  52.         $context["content"] = ((        $this->hasBlock("items"$context$blocks)) ? (        $this->renderBlock("items"$context$blocks)) : (null));
  53.         // line 17
  54.         echo "
  55. ";
  56.         // line 19
  57.         $this->loadTemplate("@ui2022/table--search.html.twig""@ui2022/table--search.html.twig"19"461024098")->display(twig_array_merge(twig_array_merge($context, ["form" =>         // line 20
  58. (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'20$this->source); })()), "sort_input" => twig_get_attribute($this->env$this->source,         // line 21
  59. (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'21$this->source); })()), "sort", [], "any"falsefalsefalse21), "dir_input" => twig_get_attribute($this->env$this->source,         // line 22
  60. (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'22$this->source); })()), "direction", [], "any"falsefalsefalse22), "header" => ["labels" =>         // line 24
  61. (isset($context["headers"]) || array_key_exists("headers"$context) ? $context["headers"] : (function () { throw new RuntimeError('Variable "headers" does not exist.'24$this->source); })())]]), ['_args' => twig_to_array(["form" =>         // line 20
  62. (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'20$this->source); })()), "sort_input" => twig_get_attribute($this->env$this->source,         // line 21
  63. (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'21$this->source); })()), "sort", [], "any"falsefalsefalse21), "dir_input" => twig_get_attribute($this->env$this->source,         // line 22
  64. (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'22$this->source); })()), "direction", [], "any"falsefalsefalse22), "header" => ["labels" =>         // line 24
  65. (isset($context["headers"]) || array_key_exists("headers"$context) ? $context["headers"] : (function () { throw new RuntimeError('Variable "headers" does not exist.'24$this->source); })())]])]));
  66.         // line 31
  67.         echo "
  68. ";
  69.         // line 33
  70.         if ((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'33$this->source); })())) {
  71.             // line 34
  72.             echo "    ";
  73.             $this->loadTemplate("@ui2022/pagination.html.twig""@ui2022/table--search.html.twig"34)->display(twig_array_merge(twig_array_merge($context, (isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'34$this->source); })())), ['_args' => twig_to_array((isset($context["pagination"]) || array_key_exists("pagination"$context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.'34$this->source); })()))]));
  74.         }
  75.         
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  77.         
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  79.     }
  80.     public function getTemplateName()
  81.     {
  82.         return "@ui2022/table--search.html.twig";
  83.     }
  84.     public function isTraitable()
  85.     {
  86.         return false;
  87.     }
  88.     public function getDebugInfo()
  89.     {
  90.         return array (  81 => 34,  79 => 33,  76 => 31,  74 => 24,  73 => 22,  72 => 21,  71 => 20,  70 => 24,  69 => 22,  68 => 21,  67 => 20,  66 => 19,  63 => 17,  61 => 16,  58 => 14,  56 => 11,  55 => 10,  54 => 9,  53 => 8,  52 => 7,  49 => 5,  47 => 4,  45 => 3,  43 => 2,);
  91.     }
  92.     public function getSourceContext()
  93.     {
  94.         return new Source("{# the html form view for the search form; expected to be of a SearchForm type #}
  95. {% set form = _args.form %}
  96. {% set headers = _args.headers %}
  97. {% set pagination = _args.pagination|default(null) %}
  98. {# use search form vars to generate sort data for the given headers  #}
  99. {% set headers = headers|map((header) => header|merge({
  100.     sort: (header.sort is defined and header.sort in form.vars.sorts) ? {
  101.         key: header.sort,
  102.         dir: (form.sort.vars.value is same as(header.sort)) ? form.direction.vars.value|dir_flip : form.vars.dirs[header.sort],
  103.         active: (form.sort.vars.value is same as(header.sort)),
  104.     } : null,
  105. })) %}
  106. {# render the content of the table; due to complexities with twig it needs done this way #}
  107. {% set content = (block('items') is defined) ? block('items') : null %}
  108. {# embed the sortable table view #}
  109. {% embed '@ui2022/table--sortable.html.twig' with {
  110.     form: form,
  111.     sort_input: form.sort,
  112.     dir_input: form.direction,
  113.     header: {
  114.         labels: headers,
  115.     },
  116. } %}
  117.     {% block items %}
  118.         {{ content|raw }}
  119.     {% endblock %}
  120. {% endembed %}
  121. {# add pagination if it is given #}
  122. {% if pagination %}
  123.     {% include '@ui2022/pagination.html.twig' with pagination %}
  124. {% endif %}
  125. ""@ui2022/table--search.html.twig""/var/www/campussuite/ui2022/table--search.html.twig");
  126.     }
  127. }
  128. /* @ui2022/table--search.html.twig */
  129. class __TwigTemplate_255b11e947085bc72e5721a8f7d96540___461024098 extends \Twig\Template
  130. {
  131.     private $source;
  132.     private $macros = [];
  133.     public function __construct(Environment $env)
  134.     {
  135.         parent::__construct($env);
  136.         $this->source $this->getSourceContext();
  137.         $this->blocks = [
  138.             'items' => [$this'block_items'],
  139.         ];
  140.     }
  141.     protected function doGetParent(array $context)
  142.     {
  143.         // line 19
  144.         return "@ui2022/table--sortable.html.twig";
  145.     }
  146.     protected function doDisplay(array $context, array $blocks = [])
  147.     {
  148.         $macros $this->macros;
  149.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  150.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ui2022/table--search.html.twig"));
  151.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  152.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@ui2022/table--search.html.twig"));
  153.         $this->parent $this->loadTemplate("@ui2022/table--sortable.html.twig""@ui2022/table--search.html.twig"19);
  154.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  155.         
  156.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  157.         
  158.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  159.     }
  160.     // line 27
  161.     public function block_items($context, array $blocks = [])
  162.     {
  163.         $macros $this->macros;
  164.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  165.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""items"));
  166.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  167.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""items"));
  168.         // line 28
  169.         echo "        ";
  170.         echo (isset($context["content"]) || array_key_exists("content"$context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.'28$this->source); })());
  171.         echo "
  172.     ";
  173.         
  174.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  175.         
  176.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  177.     }
  178.     public function getTemplateName()
  179.     {
  180.         return "@ui2022/table--search.html.twig";
  181.     }
  182.     public function isTraitable()
  183.     {
  184.         return false;
  185.     }
  186.     public function getDebugInfo()
  187.     {
  188.         return array (  202 => 28,  192 => 27,  169 => 19,  81 => 34,  79 => 33,  76 => 31,  74 => 24,  73 => 22,  72 => 21,  71 => 20,  70 => 24,  69 => 22,  68 => 21,  67 => 20,  66 => 19,  63 => 17,  61 => 16,  58 => 14,  56 => 11,  55 => 10,  54 => 9,  53 => 8,  52 => 7,  49 => 5,  47 => 4,  45 => 3,  43 => 2,);
  189.     }
  190.     public function getSourceContext()
  191.     {
  192.         return new Source("{# the html form view for the search form; expected to be of a SearchForm type #}
  193. {% set form = _args.form %}
  194. {% set headers = _args.headers %}
  195. {% set pagination = _args.pagination|default(null) %}
  196. {# use search form vars to generate sort data for the given headers  #}
  197. {% set headers = headers|map((header) => header|merge({
  198.     sort: (header.sort is defined and header.sort in form.vars.sorts) ? {
  199.         key: header.sort,
  200.         dir: (form.sort.vars.value is same as(header.sort)) ? form.direction.vars.value|dir_flip : form.vars.dirs[header.sort],
  201.         active: (form.sort.vars.value is same as(header.sort)),
  202.     } : null,
  203. })) %}
  204. {# render the content of the table; due to complexities with twig it needs done this way #}
  205. {% set content = (block('items') is defined) ? block('items') : null %}
  206. {# embed the sortable table view #}
  207. {% embed '@ui2022/table--sortable.html.twig' with {
  208.     form: form,
  209.     sort_input: form.sort,
  210.     dir_input: form.direction,
  211.     header: {
  212.         labels: headers,
  213.     },
  214. } %}
  215.     {% block items %}
  216.         {{ content|raw }}
  217.     {% endblock %}
  218. {% endembed %}
  219. {# add pagination if it is given #}
  220. {% if pagination %}
  221.     {% include '@ui2022/pagination.html.twig' with pagination %}
  222. {% endif %}
  223. ""@ui2022/table--search.html.twig""/var/www/campussuite/ui2022/table--search.html.twig");
  224.     }
  225. }