<?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;
/* areas/vakteam-loader/view.html.twig */
class __TwigTemplate_95c556ebfe611b82c73df271c0577796 extends 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", "areas/vakteam-loader/view.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/vakteam-loader/view.html.twig"));
// line 1
$context["vakteamElement"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "vakteam", ["types" => [0 => "object"], "subtypes" => ["object" => [0 => "object"]], "classes" => [0 => "Vakteam"], "reload" => true]);
// line 9
echo "<div class=\"container\">
";
// line 10
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 10, $this->source); })())) {
// line 11
echo " <div class=\"row\">
<div class=\"col-sm-10 wysiwyg-block\">
<h2>Voeg hier de vakteams toe</h2>
";
// line 14
echo (isset($context["vakteamElement"]) || array_key_exists("vakteamElement", $context) ? $context["vakteamElement"] : (function () { throw new RuntimeError('Variable "vakteamElement" does not exist.', 14, $this->source); })());
echo "
</div>
</div>
";
}
// line 18
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["vakteamElement"]) || array_key_exists("vakteamElement", $context) ? $context["vakteamElement"] : (function () { throw new RuntimeError('Variable "vakteamElement" does not exist.', 18, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["vakteam"]) {
// line 19
echo " ";
// line 20
echo " <div class=\"row\">
<div class=\"col-sm-10 wysiwyg-block\">
<h2>";
// line 22
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["vakteam"], "name", [], "any", false, false, false, 22), "html", null, true);
echo "</h2>
";
// line 23
echo twig_get_attribute($this->env, $this->source, $context["vakteam"], "content", [], "any", false, false, false, 23);
echo "
</div>
</div>
";
// line 26
if ( !(null === twig_get_attribute($this->env, $this->source, $context["vakteam"], "image", [], "any", false, false, false, 26))) {
// line 27
echo " <div class=\"row\">
<div class=\"col-sm-12\">
<img src=\"";
// line 29
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["vakteam"], "image", [], "any", false, false, false, 29), "getThumbnail", [0 => "pageImage"], "method", false, false, false, 29), "html", null, true);
echo "\" alt=\"\" class=\"img-fluid\">
</div>
</div>
";
}
// line 33
echo " ";
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["vakteam"], "jobs", [], "any", false, false, false, 33)) > 0)) {
// line 34
echo " <div class=\"row\">
<div class=\"col-sm-10 wysiwyg-block\">
<h2>Vacatures</h2>
";
// line 37
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_sort_filter($this->env, twig_get_attribute($this->env, $this->source, $context["vakteam"], "jobs", [], "any", false, false, false, 37), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 37, $this->source); })()), "date", [], "any", false, false, false, 37) >= twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 37, $this->source); })()), "date", [], "any", false, false, false, 37)); }));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["j"]) {
// line 38
echo " ";
// line 39
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["j"], "getPublished", [], "method", false, false, false, 39)) {
// line 40
echo " ";
echo twig_include($this->env, $context, "partials/job.html.twig", ["j" => $context["j"]]);
echo "
";
}
// line 42
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['j'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 43
echo " </div>
</div>
";
}
// line 46
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['vakteam'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 47
echo "</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "areas/vakteam-loader/view.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 178 => 47, 164 => 46, 159 => 43, 145 => 42, 139 => 40, 136 => 39, 134 => 38, 117 => 37, 112 => 34, 109 => 33, 102 => 29, 98 => 27, 96 => 26, 90 => 23, 86 => 22, 82 => 20, 80 => 19, 62 => 18, 55 => 14, 50 => 11, 48 => 10, 45 => 9, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% set vakteamElement = pimcore_relations('vakteam', {
types: ['object'],
subtypes: {
object: ['object']
},
classes: ['Vakteam'],
reload: true
}) %}
<div class=\"container\">
{% if editmode %}
<div class=\"row\">
<div class=\"col-sm-10 wysiwyg-block\">
<h2>Voeg hier de vakteams toe</h2>
{{ vakteamElement|raw }}
</div>
</div>
{% endif %}
{% for vakteam in vakteamElement %}
{# @var vakteam \\Pimcore\\Model\\DataObject\\Vakteam #}
<div class=\"row\">
<div class=\"col-sm-10 wysiwyg-block\">
<h2>{{ vakteam.name }}</h2>
{{ vakteam.content|raw }}
</div>
</div>
{% if vakteam.image is not null %}
<div class=\"row\">
<div class=\"col-sm-12\">
<img src=\"{{ vakteam.image.getThumbnail('pageImage') }}\" alt=\"\" class=\"img-fluid\">
</div>
</div>
{% endif %}
{% if vakteam.jobs|length > 0 %}
<div class=\"row\">
<div class=\"col-sm-10 wysiwyg-block\">
<h2>Vacatures</h2>
{% for j in vakteam.jobs|sort((a,b) => b.date >= a.date) %}
{# @var j \\Pimcore\\Model\\DataObject\\Job #}
{% if j.getPublished() %}
{{ include(\"partials/job.html.twig\", {j: j}) }}
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
{% endfor %}
</div>", "areas/vakteam-loader/view.html.twig", "/var/www/dev/templates/areas/vakteam-loader/view.html.twig");
}
}