<?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;
/* livecam/index.html.twig */
class __TwigTemplate_cc13bf95a54c16758fbc9eefd91db108 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title_suffix' => [$this, 'block_title_suffix'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return $this->loadTemplate($this->extensions['App\Twig\MiscExtension']->getBaseTemplateName(twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 1, $this->source); })()), "request", [], "any", false, false, false, 1)), "livecam/index.html.twig", 1);
}
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", "livecam/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "livecam/index.html.twig"));
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_title_suffix($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", "title_suffix"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title_suffix"));
echo "Live-Cams - Seite ";
echo twig_escape_filter($this->env, ((array_key_exists("page", $context)) ? (_twig_default_filter((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 2, $this->source); })()), 1)) : (1)), "html", null, true);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 4
public function block_body($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", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 5
echo " ";
$cached = $this->env->getRuntime('Twig\Extra\Cache\CacheRuntime')->getCache()->get(("livecams-online-page-" . ((array_key_exists("page", $context)) ? (_twig_default_filter((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 5, $this->source); })()), 1)) : (1))), function (\Symfony\Contracts\Cache\ItemInterface $item) use ($context, $macros) {
$item->expiresAfter(5);
ob_start(function () { return ''; });
// line 6
echo " ";
if (twig_length_filter($this->env, (isset($context["amateurs"]) || array_key_exists("amateurs", $context) ? $context["amateurs"] : (function () { throw new RuntimeError('Variable "amateurs" does not exist.', 6, $this->source); })()))) {
// line 7
echo " <h2 class=\"mb-3\">Die besten online Amateure mit Live-Cam</h2>
<div class=\"resultlist row\">
";
// line 9
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["amateurs"]) || array_key_exists("amateurs", $context) ? $context["amateurs"] : (function () { throw new RuntimeError('Variable "amateurs" does not exist.', 9, $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["amateur"]) {
// line 10
echo " ";
$this->loadTemplate("_widgets/home-amateur.html.twig", "livecam/index.html.twig", 10)->display(twig_array_merge($context, ["member" => $context["amateur"]]));
// line 11
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['amateur'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 12
echo " </div>
";
// line 13
if ($this->extensions['App\Twig\MiscExtension']->shouldSeePagination((isset($context["amateurs"]) || array_key_exists("amateurs", $context) ? $context["amateurs"] : (function () { throw new RuntimeError('Variable "amateurs" does not exist.', 13, $this->source); })()))) {
// line 14
echo " ";
echo $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["amateurs"]) || array_key_exists("amateurs", $context) ? $context["amateurs"] : (function () { throw new RuntimeError('Variable "amateurs" does not exist.', 14, $this->source); })()));
echo "
";
}
// line 16
echo " ";
}
// line 17
echo " <h2> Online Amateure mit Live-Chat</h2>
<div class=\"resultlist row\">
";
// line 19
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["online_amateurs"]) || array_key_exists("online_amateurs", $context) ? $context["online_amateurs"] : (function () { throw new RuntimeError('Variable "online_amateurs" does not exist.', 19, $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["amateur"]) {
// line 20
echo " ";
if ( !$this->extensions['App\Twig\AmateurExtension']->isWebcamOnline($context["amateur"])) {
// line 21
echo " ";
$this->loadTemplate("_widgets/home-amateur.html.twig", "livecam/index.html.twig", 21)->display(twig_array_merge($context, ["member" => $context["amateur"]]));
// line 22
echo " ";
}
// line 23
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['amateur'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 24
echo " </div>
";
return ob_get_clean();
});
echo '' === $cached ? '' : new Markup($cached, $this->env->getCharset());
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "livecam/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 192 => 24, 178 => 23, 175 => 22, 172 => 21, 169 => 20, 152 => 19, 148 => 17, 145 => 16, 139 => 14, 137 => 13, 134 => 12, 120 => 11, 117 => 10, 100 => 9, 96 => 7, 93 => 6, 88 => 5, 78 => 4, 58 => 2, 36 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends baseTemplateName(app.request) %}
{% block title_suffix %}Live-Cams - Seite {{ page|default(1) }}{% endblock %}
{% block body %}
{% cache \"livecams-online-page-\" ~ page|default(1) ttl(5) %}
{% if amateurs|length %}
<h2 class=\"mb-3\">Die besten online Amateure mit Live-Cam</h2>
<div class=\"resultlist row\">
{% for amateur in amateurs %}
{% include '_widgets/home-amateur.html.twig' with { member: amateur } %}
{% endfor %}
</div>
{% if shouldSeePagination(amateurs) %}
{{ knp_pagination_render(amateurs) }}
{% endif %}
{% endif %}
<h2> Online Amateure mit Live-Chat</h2>
<div class=\"resultlist row\">
{% for amateur in online_amateurs %}
{% if not isWebcamOnline(amateur) %}
{% include '_widgets/home-amateur.html.twig' with { member: amateur } %}
{% endif %}
{% endfor %}
</div>
{% endcache %}
{% endblock %}
", "livecam/index.html.twig", "/var/www/frontend-dev/apps/frontend/templates/livecam/index.html.twig");
}
}