<?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;
/* Slivki/banners/comments_banner.html.twig */
class __TwigTemplate_c3f8c90229c6ac7496101bef7c8d31eb94c8d0509539cf79619846b543d2f0b6 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Slivki/banners/comments_banner.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Slivki/banners/comments_banner.html.twig"));
// line 1
echo "
";
// line 2
if ((0 === twig_compare(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 2, $this->source); })()), "getCityIds", [], "method", false, false, false, 2), 0, [], "array", false, false, false, 2), twig_get_attribute($this->env, $this->source, $this->extensions['Slivki\Twig\SlivkiTwigExtension']->getCurrentCity(), "getID", [], "method", false, false, false, 2)))) {
// line 3
echo " <div data-id=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 3, $this->source); })()), "getID", [], "method", false, false, false, 3), "html", null, true);
echo "\" class=\"comments-banner\" style=\"margin: 20px auto;\">
";
// line 4
if (twig_get_attribute($this->env, $this->source, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 4, $this->source); })()), "isJavaScript", [], "method", false, false, false, 4)) {
// line 5
echo " ";
echo twig_get_attribute($this->env, $this->source, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 5, $this->source); })()), "getCode", [], "method", false, false, false, 5);
echo "
";
} else {
// line 7
echo " ";
if (twig_in_filter(".swf", twig_get_attribute($this->env, $this->source, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 7, $this->source); })()), "getFilePath", [], "method", false, false, false, 7))) {
// line 8
echo " ";
$this->loadTemplate("Slivki/banners/swf_banner.html.twig", "Slivki/banners/comments_banner.html.twig", 8)->display(twig_array_merge($context, ["banner" => (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 8, $this->source); })()), "width" => "650", "height" => "90"]));
// line 9
echo " ";
} else {
// line 10
echo " <a href=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 10, $this->source); })()), "getURL", [], "method", false, false, false, 10), "html", null, true);
echo "\" target=\"_blank\" rel=\"nofollow\">
<img style=\"border:none; margin: 0 auto;\" src=\"";
// line 11
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 11, $this->source); })()), "getFilePath", [], "method", false, false, false, 11), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 11, $this->source); })()), "getTitle", [], "method", false, false, false, 11), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 11, $this->source); })()), "getTitle", [], "method", false, false, false, 11), "html", null, true);
echo "\"/>
</a>
";
}
// line 14
echo " ";
}
// line 15
echo " </div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Slivki/banners/comments_banner.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 88 => 15, 85 => 14, 75 => 11, 70 => 10, 67 => 9, 64 => 8, 61 => 7, 55 => 5, 53 => 4, 48 => 3, 46 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("
{% if banner.getCityIds()[0] == getCurrentCity().getID() %}
<div data-id=\"{{ banner.getID() }}\" class=\"comments-banner\" style=\"margin: 20px auto;\">
{% if banner.isJavaScript() %}
{{ banner.getCode()|raw }}
{% else %}
{% if '.swf' in banner.getFilePath() %}
{% include 'Slivki/banners/swf_banner.html.twig' with {'banner': banner, 'width': '650', 'height': '90'} %}
{% else %}
<a href=\"{{ banner.getURL() }}\" target=\"_blank\" rel=\"nofollow\">
<img style=\"border:none; margin: 0 auto;\" src=\"{{ banner.getFilePath() }}\" alt=\"{{ banner.getTitle() }}\" title=\"{{ banner.getTitle() }}\"/>
</a>
{% endif %}
{% endif %}
</div>
{% endif %}
", "Slivki/banners/comments_banner.html.twig", "/mnt/data/virtwww/dima/templates/Slivki/banners/comments_banner.html.twig");
}
}