<?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;
/* @Provider/areas/iconlist/view.html.twig */
class __TwigTemplate_d0149a4ae58fba9cab3d61801636c50f extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
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", "@Provider/areas/iconlist/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", "@Provider/areas/iconlist/view.html.twig"));
// line 1
$macros["__internal_parse_0"] = $this->macros["__internal_parse_0"] = $this->loadTemplate("@Provider/macros/iconbox.html.twig", "@Provider/areas/iconlist/view.html.twig", 1)->unwrap();
// line 2
echo "
";
// line 4
$context["class"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "class"), "getData", [], "method", false, false, true, 4);
// line 5
$context["marginTop"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "margin_top"), "getData", [], "method", false, false, true, 5);
// line 6
$context["marginBottom"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "margin_bottom"), "getData", [], "method", false, false, true, 6);
// line 7
$context["containerWidth"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "container_width"), "getData", [], "method", false, false, true, 7);
// line 8
$context["areaClass"] = (((((($this->sandbox->ensureToStringAllowed((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 8, $this->source); })()), 8, $this->source) . " ") . $this->sandbox->ensureToStringAllowed((isset($context["marginTop"]) || array_key_exists("marginTop", $context) ? $context["marginTop"] : (function () { throw new RuntimeError('Variable "marginTop" does not exist.', 8, $this->source); })()), 8, $this->source)) . " ") . $this->sandbox->ensureToStringAllowed((isset($context["marginBottom"]) || array_key_exists("marginBottom", $context) ? $context["marginBottom"] : (function () { throw new RuntimeError('Variable "marginBottom" does not exist.', 8, $this->source); })()), 8, $this->source)) . " ") . $this->sandbox->ensureToStringAllowed((isset($context["containerWidth"]) || array_key_exists("containerWidth", $context) ? $context["containerWidth"] : (function () { throw new RuntimeError('Variable "containerWidth" does not exist.', 8, $this->source); })()), 8, $this->source));
// line 9
$context["anchorId"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "anchor"), "getData", [], "method", false, false, true, 9);
// line 10
echo "
";
// line 12
$context["cols"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "cols"), "getData", [], "method", false, false, true, 12);
// line 13
$context["linkAsBtn"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "link_as_button"), "isChecked", [], "method", false, false, true, 13);
// line 14
$context["iconSize"] = twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "icon_size"), "getData", [], "method", false, false, true, 14);
// line 15
$context["iconboxVariant"] = ((twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 15, $this->source); })()), "getProperty", [0 => "iconbox_variant"], "method", false, false, true, 15)) ? (twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 15, $this->source); })()), "getProperty", [0 => "iconbox_variant"], "method", false, false, true, 15)) : (""));
// line 16
echo "
";
// line 17
if (twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "checkbox", "mobile_one_column"), "isChecked", [], "method", false, false, true, 17)) {
// line 18
echo " ";
$context["areaClass"] = (($this->sandbox->ensureToStringAllowed((isset($context["areaClass"]) || array_key_exists("areaClass", $context) ? $context["areaClass"] : (function () { throw new RuntimeError('Variable "areaClass" does not exist.', 18, $this->source); })()), 18, $this->source) . " ") . "mobileOneColumn");
}
// line 20
echo "
<div class=\"area area--icon-list ";
// line 21
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["areaClass"]) || array_key_exists("areaClass", $context) ? $context["areaClass"] : (function () { throw new RuntimeError('Variable "areaClass" does not exist.', 21, $this->source); })()), 21, $this->source), "html", null, true);
echo "\"";
if ((isset($context["anchorId"]) || array_key_exists("anchorId", $context) ? $context["anchorId"] : (function () { throw new RuntimeError('Variable "anchorId" does not exist.', 21, $this->source); })())) {
echo " id=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["anchorId"]) || array_key_exists("anchorId", $context) ? $context["anchorId"] : (function () { throw new RuntimeError('Variable "anchorId" does not exist.', 21, $this->source); })()), 21, $this->source), "html", null, true);
echo "\"";
}
echo ">
";
// line 22
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 22, $this->source); })())) {
// line 23
echo " ";
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "iconlist_items", ["types" => [0 => "object"], "subtypes" => ["object" => [0 => "object"]], "classes" => [0 => "Iconbox"], "reload" => true]);
// line 30
echo "
";
}
// line 32
echo " <div class=\"area--icon-list-inner ";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["iconboxVariant"]) || array_key_exists("iconboxVariant", $context) ? $context["iconboxVariant"] : (function () { throw new RuntimeError('Variable "iconboxVariant" does not exist.', 32, $this->source); })()), 32, $this->source), "html", null, true);
echo "\">
<div class=\"cols cols--";
// line 33
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["cols"]) || array_key_exists("cols", $context) ? $context["cols"] : (function () { throw new RuntimeError('Variable "cols" does not exist.', 33, $this->source); })()), 33, $this->source), "html", null, true);
echo "\">
";
// line 34
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "iconlist_items"));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 35
echo " ";
echo twig_call_macro($macros["__internal_parse_0"], "macro_iconBox", [$context["item"], (isset($context["iconSize"]) || array_key_exists("iconSize", $context) ? $context["iconSize"] : (function () { throw new RuntimeError('Variable "iconSize" does not exist.', 35, $this->source); })()), (isset($context["linkAsBtn"]) || array_key_exists("linkAsBtn", $context) ? $context["linkAsBtn"] : (function () { throw new RuntimeError('Variable "linkAsBtn" does not exist.', 35, $this->source); })())], 35, $context, $this->getSourceContext());
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 37
echo " </div>
</div>
</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@Provider/areas/iconlist/view.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 126 => 37, 117 => 35, 113 => 34, 109 => 33, 104 => 32, 100 => 30, 97 => 23, 95 => 22, 85 => 21, 82 => 20, 78 => 18, 76 => 17, 73 => 16, 71 => 15, 69 => 14, 67 => 13, 65 => 12, 62 => 10, 60 => 9, 58 => 8, 56 => 7, 54 => 6, 52 => 5, 50 => 4, 47 => 2, 45 => 1,);
}
public function getSourceContext()
{
return new Source("{% from '@Provider/macros/iconbox.html.twig' import iconBox %}
{# Default block settings #}
{% set class = pimcore_input('class').getData() %}
{% set marginTop = pimcore_select('margin_top').getData() %}
{% set marginBottom = pimcore_select('margin_bottom').getData() %}
{% set containerWidth = pimcore_select('container_width').getData() %}
{% set areaClass = class ~ ' ' ~ marginTop ~ ' ' ~ marginBottom ~ ' ' ~ containerWidth %}
{% set anchorId = pimcore_input('anchor').getData() %}
{# Iconlist block settings #}
{% set cols = pimcore_select('cols').getData() %}
{% set linkAsBtn = pimcore_checkbox('link_as_button').isChecked() %}
{% set iconSize = pimcore_select('icon_size').getData() %}
{% set iconboxVariant = document.getProperty('iconbox_variant') ? document.getProperty('iconbox_variant') : '' %}
{% if pimcore_checkbox('mobile_one_column').isChecked() %}
{% set areaClass = areaClass ~ ' ' ~ 'mobileOneColumn' %}
{% endif %}
<div class=\"area area--icon-list {{ areaClass }}\"{% if anchorId %} id=\"{{ anchorId }}\"{% endif %}>
{% if editmode %}
{{ pimcore_relations('iconlist_items', {
\"types\": [\"object\"],
\"subtypes\": {
\"object\": [\"object\"]
},
\"classes\": [\"Iconbox\"],
\"reload\": true
}) }}
{% endif %}
<div class=\"area--icon-list-inner {{ iconboxVariant }}\">
<div class=\"cols cols--{{ cols }}\">
{% for item in pimcore_relations('iconlist_items') %}
{{ iconBox(item, iconSize, linkAsBtn) }}
{% endfor %}
</div>
</div>
</div>", "@Provider/areas/iconlist/view.html.twig", "/html/pimcore/templates/bundles/ProviderBundle/areas/iconlist/view.html.twig");
}
public function checkSecurity()
{
static $tags = array("from" => 1, "set" => 4, "if" => 17, "for" => 34);
static $filters = array("escape" => 21);
static $functions = array("pimcore_input" => 4, "pimcore_select" => 5, "pimcore_checkbox" => 13, "pimcore_relations" => 23);
try {
$this->sandbox->checkSecurity(
['from', 'set', 'if', 'for'],
['escape'],
['pimcore_input', 'pimcore_select', 'pimcore_checkbox', 'pimcore_relations']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}