<?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;
/* @CmsContent/Render/Widget.html.twig */
class __TwigTemplate_42ec5293dde47c41a66cd9cafe5e5257 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", "@CmsContent/Render/Widget.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@CmsContent/Render/Widget.html.twig"));
// line 1
echo "<div data-cms-widget=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["_widget"]) || array_key_exists("_widget", $context) ? $context["_widget"] : (function () { throw new RuntimeError('Variable "_widget" does not exist.', 1, $this->source); })()), "__fqcn__", [], "any", false, false, false, 1), "html", null, true);
echo "\" ";
echo $this->extensions['Cms\WidgetBundle\Service\Twig\WidgetExtension']->functionWidgetContainer((((twig_get_attribute($this->env, $this->source, // line 2
($context["_widget"] ?? null), "container", [], "any", true, true, false, 2) && !(null === twig_get_attribute($this->env, $this->source, (isset($context["_widget"]) || array_key_exists("_widget", $context) ? $context["_widget"] : (function () { throw new RuntimeError('Variable "_widget" does not exist.', 2, $this->source); })()), "container", [], "any", false, false, false, 2)))) ? (twig_get_attribute($this->env, $this->source, (isset($context["_widget"]) || array_key_exists("_widget", $context) ? $context["_widget"] : (function () { throw new RuntimeError('Variable "_widget" does not exist.', 2, $this->source); })()), "container", [], "any", false, false, false, 2)) : (null)), // line 3
(isset($context["_htmlId"]) || array_key_exists("_htmlId", $context) ? $context["_htmlId"] : (function () { throw new RuntimeError('Variable "_htmlId" does not exist.', 3, $this->source); })()));
// line 4
echo ">
";
// line 5
if ( !(null === (isset($context["_error"]) || array_key_exists("_error", $context) ? $context["_error"] : (function () { throw new RuntimeError('Variable "_error" does not exist.', 5, $this->source); })()))) {
// line 6
echo " <div data-cms-widget-error>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["_handler"]) || array_key_exists("_handler", $context) ? $context["_handler"] : (function () { throw new RuntimeError('Variable "_handler" does not exist.', 6, $this->source); })()), "key", [], "any", false, false, false, 6), "html", null, true);
echo ":ERROR:";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["_error"]) || array_key_exists("_error", $context) ? $context["_error"] : (function () { throw new RuntimeError('Variable "_error" does not exist.', 6, $this->source); })()), "message", [], "any", false, false, false, 6), "html", null, true);
echo "</div>
";
} else {
// line 8
echo " ";
$this->loadTemplate((isset($context["_twig"]) || array_key_exists("_twig", $context) ? $context["_twig"] : (function () { throw new RuntimeError('Variable "_twig" does not exist.', 8, $this->source); })()), "@CmsContent/Render/Widget.html.twig", 8)->display(twig_array_merge($context, ['_args' => []]));
// line 9
echo " ";
}
// line 10
echo "</div>
";
// line 11
if ((((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["_handler"]) || array_key_exists("_handler", $context) ? $context["_handler"] : (function () { throw new RuntimeError('Variable "_handler" does not exist.', 11, $this->source); })()), "styles", [], "any", false, false, false, 11)) > 0) || (twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["_handler"]) || array_key_exists("_handler", $context) ? $context["_handler"] : (function () { throw new RuntimeError('Variable "_handler" does not exist.', 11, $this->source); })()), "scripts", [], "any", false, false, false, 11)) > 0)) || twig_get_attribute($this->env, $this->source, (isset($context["_handler"]) || array_key_exists("_handler", $context) ? $context["_handler"] : (function () { throw new RuntimeError('Variable "_handler" does not exist.', 11, $this->source); })()), "hasPlugin", [], "method", false, false, false, 11))) {
// line 12
echo " <script type=\"text/javascript\">
Campussuite.Widgets.run(";
// line 13
echo $this->extensions['Cms\WidgetBundle\Service\Twig\WidgetExtension']->functionWidgetTrigger( // line 14
(isset($context["_handler"]) || array_key_exists("_handler", $context) ? $context["_handler"] : (function () { throw new RuntimeError('Variable "_handler" does not exist.', 14, $this->source); })()), // line 15
(isset($context["_plugin"]) || array_key_exists("_plugin", $context) ? $context["_plugin"] : (function () { throw new RuntimeError('Variable "_plugin" does not exist.', 15, $this->source); })()), // line 16
(isset($context["_htmlId"]) || array_key_exists("_htmlId", $context) ? $context["_htmlId"] : (function () { throw new RuntimeError('Variable "_htmlId" does not exist.', 16, $this->source); })()), ((( // line 17
array_key_exists("_styles", $context) && twig_test_iterable((isset($context["_styles"]) || array_key_exists("_styles", $context) ? $context["_styles"] : (function () { throw new RuntimeError('Variable "_styles" does not exist.', 17, $this->source); })())))) ? ((isset($context["_styles"]) || array_key_exists("_styles", $context) ? $context["_styles"] : (function () { throw new RuntimeError('Variable "_styles" does not exist.', 17, $this->source); })())) : ([])), ((( // line 18
array_key_exists("_scripts", $context) && twig_test_iterable((isset($context["_scripts"]) || array_key_exists("_scripts", $context) ? $context["_scripts"] : (function () { throw new RuntimeError('Variable "_scripts" does not exist.', 18, $this->source); })())))) ? ((isset($context["_scripts"]) || array_key_exists("_scripts", $context) ? $context["_scripts"] : (function () { throw new RuntimeError('Variable "_scripts" does not exist.', 18, $this->source); })())) : ([])));
// line 19
echo ");
</script>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@CmsContent/Render/Widget.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 84 => 19, 82 => 18, 81 => 17, 80 => 16, 79 => 15, 78 => 14, 77 => 13, 74 => 12, 72 => 11, 69 => 10, 66 => 9, 63 => 8, 55 => 6, 53 => 5, 50 => 4, 48 => 3, 47 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<div data-cms-widget=\"{{ _widget.__fqcn__ }}\" {{ cms_widgetContainer(
(_widget.container is defined and _widget.container is not null) ? _widget.container : null,
_htmlId
) }}>
{% if _error is not null %}
<div data-cms-widget-error>{{ _handler.key }}:ERROR:{{ _error.message }}</div>
{% else %}
{% include _twig %}
{% endif %}
</div>
{% if _handler.styles|length > 0 or _handler.scripts|length > 0 or _handler.hasPlugin() %}
<script type=\"text/javascript\">
Campussuite.Widgets.run({{ cms_widgetTrigger(
_handler,
_plugin,
_htmlId,
((_styles is defined and _styles is iterable) ? _styles : []),
((_scripts is defined and _scripts is iterable) ? _scripts : [])
) }});
</script>
{% endif %}
", "@CmsContent/Render/Widget.html.twig", "/var/www/campussuite/src/Cms/ContentBundle/Resources/views/Render/Widget.html.twig");
}
}