<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @ui2022/table--search.html.twig */
class __TwigTemplate_255b11e947085bc72e5721a8f7d96540 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ui2022/table--search.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ui2022/table--search.html.twig"));
// line 2
$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", false, false, false, 2);
// line 3
$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", false, false, false, 3);
// line 4
$context["pagination"] = ((twig_get_attribute($this->env, $this->source, ($context["_args"] ?? null), "pagination", [], "any", true, true, false, 4)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["_args"] ?? null), "pagination", [], "any", false, false, false, 4), null)) : (null));
// line 5
echo "
";
// line 7
$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
($context["header"] ?? null), "sort", [], "any", true, true, false, 8) && 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", false, false, false, 8), twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 8), "sorts", [], "any", false, false, false, 8)))) ? (["key" => twig_get_attribute($this->env, $this->source, // line 9
(isset($context["header"]) || array_key_exists("header", $context) ? $context["header"] : (function () { throw new RuntimeError('Variable "header" does not exist.', 9, $this->source); })()), "sort", [], "any", false, false, false, 9), "dir" => (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 10
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 10, $this->source); })()), "sort", [], "any", false, false, false, 10), "vars", [], "any", false, false, false, 10), "value", [], "any", false, false, false, 10) === 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", false, false, false, 10))) ? ($this->extensions['App\Twig\Extension\MiscellaneousExtension']->dir_flip(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 10), "vars", [], "any", false, false, false, 10), "value", [], "any", false, false, false, 10))) : (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 10), "dirs", [], "any", false, false, false, 10), 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", false, false, false, 10), [], "array", false, false, false, 10))), "active" => (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 11
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 11, $this->source); })()), "sort", [], "any", false, false, false, 11), "vars", [], "any", false, false, false, 11), "value", [], "any", false, false, false, 11) === 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", false, false, false, 11))]) : (null))]); });
// line 14
echo "
";
// line 16
$context["content"] = (( $this->hasBlock("items", $context, $blocks)) ? ( $this->renderBlock("items", $context, $blocks)) : (null));
// line 17
echo "
";
// line 19
$this->loadTemplate("@ui2022/table--search.html.twig", "@ui2022/table--search.html.twig", 19, "817354600")->display(twig_array_merge(twig_array_merge($context, ["form" => // line 20
(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
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 21, $this->source); })()), "sort", [], "any", false, false, false, 21), "dir_input" => twig_get_attribute($this->env, $this->source, // line 22
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 22, $this->source); })()), "direction", [], "any", false, false, false, 22), "header" => ["labels" => // line 24
(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
(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
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 21, $this->source); })()), "sort", [], "any", false, false, false, 21), "dir_input" => twig_get_attribute($this->env, $this->source, // line 22
(isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 22, $this->source); })()), "direction", [], "any", false, false, false, 22), "header" => ["labels" => // line 24
(isset($context["headers"]) || array_key_exists("headers", $context) ? $context["headers"] : (function () { throw new RuntimeError('Variable "headers" does not exist.', 24, $this->source); })())]])]));
// line 31
echo "
";
// line 33
if ((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 33, $this->source); })())) {
// line 34
echo " ";
$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); })()))]));
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@ui2022/table--search.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{# the html form view for the search form; expected to be of a SearchForm type #}
{% set form = _args.form %}
{% set headers = _args.headers %}
{% set pagination = _args.pagination|default(null) %}
{# use search form vars to generate sort data for the given headers #}
{% set headers = headers|map((header) => header|merge({
sort: (header.sort is defined and header.sort in form.vars.sorts) ? {
key: header.sort,
dir: (form.sort.vars.value is same as(header.sort)) ? form.direction.vars.value|dir_flip : form.vars.dirs[header.sort],
active: (form.sort.vars.value is same as(header.sort)),
} : null,
})) %}
{# render the content of the table; due to complexities with twig it needs done this way #}
{% set content = (block('items') is defined) ? block('items') : null %}
{# embed the sortable table view #}
{% embed '@ui2022/table--sortable.html.twig' with {
form: form,
sort_input: form.sort,
dir_input: form.direction,
header: {
labels: headers,
},
} %}
{% block items %}
{{ content|raw }}
{% endblock %}
{% endembed %}
{# add pagination if it is given #}
{% if pagination %}
{% include '@ui2022/pagination.html.twig' with pagination %}
{% endif %}
", "@ui2022/table--search.html.twig", "/var/www/campussuite/ui2022/table--search.html.twig");
}
}
/* @ui2022/table--search.html.twig */
class __TwigTemplate_255b11e947085bc72e5721a8f7d96540___817354600 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'items' => [$this, 'block_items'],
];
}
protected function doGetParent(array $context)
{
// line 19
return "@ui2022/table--sortable.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ui2022/table--search.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ui2022/table--search.html.twig"));
$this->parent = $this->loadTemplate("@ui2022/table--sortable.html.twig", "@ui2022/table--search.html.twig", 19);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 27
public function block_items($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "items"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "items"));
// line 28
echo " ";
echo (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 28, $this->source); })());
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@ui2022/table--search.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{# the html form view for the search form; expected to be of a SearchForm type #}
{% set form = _args.form %}
{% set headers = _args.headers %}
{% set pagination = _args.pagination|default(null) %}
{# use search form vars to generate sort data for the given headers #}
{% set headers = headers|map((header) => header|merge({
sort: (header.sort is defined and header.sort in form.vars.sorts) ? {
key: header.sort,
dir: (form.sort.vars.value is same as(header.sort)) ? form.direction.vars.value|dir_flip : form.vars.dirs[header.sort],
active: (form.sort.vars.value is same as(header.sort)),
} : null,
})) %}
{# render the content of the table; due to complexities with twig it needs done this way #}
{% set content = (block('items') is defined) ? block('items') : null %}
{# embed the sortable table view #}
{% embed '@ui2022/table--sortable.html.twig' with {
form: form,
sort_input: form.sort,
dir_input: form.direction,
header: {
labels: headers,
},
} %}
{% block items %}
{{ content|raw }}
{% endblock %}
{% endembed %}
{# add pagination if it is given #}
{% if pagination %}
{% include '@ui2022/pagination.html.twig' with pagination %}
{% endif %}
", "@ui2022/table--search.html.twig", "/var/www/campussuite/ui2022/table--search.html.twig");
}
}