var/cache/dev/twig/58/58d477eb99066c423a043508fca0cac0.php line 114

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @Provider/areas/iconlist/view.html.twig */
  14. class __TwigTemplate_d0149a4ae58fba9cab3d61801636c50f extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Provider/areas/iconlist/view.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Provider/areas/iconlist/view.html.twig"));
  35.         // line 1
  36.         $macros["__internal_parse_0"] = $this->macros["__internal_parse_0"] = $this->loadTemplate("@Provider/macros/iconbox.html.twig""@Provider/areas/iconlist/view.html.twig"1)->unwrap();
  37.         // line 2
  38.         echo "
  39. ";
  40.         // line 4
  41.         $context["class"] = twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""class"), "getData", [], "method"falsefalsetrue4);
  42.         // line 5
  43.         $context["marginTop"] = twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select""margin_top"), "getData", [], "method"falsefalsetrue5);
  44.         // line 6
  45.         $context["marginBottom"] = twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select""margin_bottom"), "getData", [], "method"falsefalsetrue6);
  46.         // line 7
  47.         $context["containerWidth"] = twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select""container_width"), "getData", [], "method"falsefalsetrue7);
  48.         // line 8
  49.         $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));
  50.         // line 9
  51.         $context["anchorId"] = twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"input""anchor"), "getData", [], "method"falsefalsetrue9);
  52.         // line 10
  53.         echo "
  54. ";
  55.         // line 12
  56.         $context["cols"] = twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select""cols"), "getData", [], "method"falsefalsetrue12);
  57.         // line 13
  58.         $context["linkAsBtn"] = twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"checkbox""link_as_button"), "isChecked", [], "method"falsefalsetrue13);
  59.         // line 14
  60.         $context["iconSize"] = twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select""icon_size"), "getData", [], "method"falsefalsetrue14);
  61.         // line 15
  62.         $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", [=> "iconbox_variant"], "method"falsefalsetrue15)) ? (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", [=> "iconbox_variant"], "method"falsefalsetrue15)) : (""));
  63.         // line 16
  64.         echo "
  65. ";
  66.         // line 17
  67.         if (twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"checkbox""mobile_one_column"), "isChecked", [], "method"falsefalsetrue17)) {
  68.             // line 18
  69.             echo "    ";
  70.             $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");
  71.         }
  72.         // line 20
  73.         echo "
  74. <div class=\"area area--icon-list ";
  75.         // line 21
  76.         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"nulltrue);
  77.         echo "\"";
  78.         if ((isset($context["anchorId"]) || array_key_exists("anchorId"$context) ? $context["anchorId"] : (function () { throw new RuntimeError('Variable "anchorId" does not exist.'21$this->source); })())) {
  79.             echo " id=\"";
  80.             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"nulltrue);
  81.             echo "\"";
  82.         }
  83.         echo ">
  84.     ";
  85.         // line 22
  86.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'22$this->source); })())) {
  87.             // line 23
  88.             echo "        ";
  89.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"relations""iconlist_items", ["types" => [=> "object"], "subtypes" => ["object" => [=> "object"]], "classes" => [=> "Iconbox"], "reload" => true]);
  90.             // line 30
  91.             echo "
  92.     ";
  93.         }
  94.         // line 32
  95.         echo "    <div class=\"area--icon-list-inner ";
  96.         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"nulltrue);
  97.         echo "\">
  98.         <div class=\"cols cols--";
  99.         // line 33
  100.         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"nulltrue);
  101.         echo "\">
  102.             ";
  103.         // line 34
  104.         $context['_parent'] = $context;
  105.         $context['_seq'] = twig_ensure_traversable($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"relations""iconlist_items"));
  106.         foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  107.             // line 35
  108.             echo "                ";
  109.             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());
  110.             echo "
  111.             ";
  112.         }
  113.         $_parent $context['_parent'];
  114.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  115.         $context array_intersect_key($context$_parent) + $_parent;
  116.         // line 37
  117.         echo "        </div>
  118.     </div>
  119. </div>";
  120.         
  121.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  122.         
  123.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  124.     }
  125.     public function getTemplateName()
  126.     {
  127.         return "@Provider/areas/iconlist/view.html.twig";
  128.     }
  129.     public function isTraitable()
  130.     {
  131.         return false;
  132.     }
  133.     public function getDebugInfo()
  134.     {
  135.         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,);
  136.     }
  137.     public function getSourceContext()
  138.     {
  139.         return new Source("{% from '@Provider/macros/iconbox.html.twig' import iconBox %}
  140. {# Default block settings #}
  141. {% set class            = pimcore_input('class').getData() %}
  142. {% set marginTop        = pimcore_select('margin_top').getData() %}
  143. {% set marginBottom     = pimcore_select('margin_bottom').getData() %}
  144. {% set containerWidth   = pimcore_select('container_width').getData() %}
  145. {% set areaClass        = class ~ ' ' ~ marginTop ~ ' ' ~ marginBottom ~ ' ' ~ containerWidth %}
  146. {% set anchorId         = pimcore_input('anchor').getData() %}
  147. {# Iconlist block settings #}
  148. {% set cols             = pimcore_select('cols').getData() %}
  149. {% set linkAsBtn        = pimcore_checkbox('link_as_button').isChecked() %}
  150. {% set iconSize         = pimcore_select('icon_size').getData() %}
  151. {% set iconboxVariant   = document.getProperty('iconbox_variant') ? document.getProperty('iconbox_variant') : '' %}
  152. {% if pimcore_checkbox('mobile_one_column').isChecked() %}
  153.     {% set areaClass = areaClass ~ ' ' ~ 'mobileOneColumn' %}
  154. {% endif %}
  155. <div class=\"area area--icon-list {{ areaClass }}\"{% if anchorId %} id=\"{{ anchorId }}\"{% endif %}>
  156.     {% if editmode %}
  157.         {{ pimcore_relations('iconlist_items', {
  158.             \"types\": [\"object\"],
  159.             \"subtypes\": {
  160.                 \"object\": [\"object\"]
  161.             },
  162.             \"classes\": [\"Iconbox\"],
  163.             \"reload\": true
  164.         }) }}
  165.     {% endif %}
  166.     <div class=\"area--icon-list-inner {{ iconboxVariant }}\">
  167.         <div class=\"cols cols--{{ cols }}\">
  168.             {% for item in pimcore_relations('iconlist_items') %}
  169.                 {{ iconBox(item, iconSize, linkAsBtn) }}
  170.             {% endfor %}
  171.         </div>
  172.     </div>
  173. </div>""@Provider/areas/iconlist/view.html.twig""/html/pimcore/templates/bundles/ProviderBundle/areas/iconlist/view.html.twig");
  174.     }
  175.     
  176.     public function checkSecurity()
  177.     {
  178.         static $tags = array("from" => 1"set" => 4"if" => 17"for" => 34);
  179.         static $filters = array("escape" => 21);
  180.         static $functions = array("pimcore_input" => 4"pimcore_select" => 5"pimcore_checkbox" => 13"pimcore_relations" => 23);
  181.         try {
  182.             $this->sandbox->checkSecurity(
  183.                 ['from''set''if''for'],
  184.                 ['escape'],
  185.                 ['pimcore_input''pimcore_select''pimcore_checkbox''pimcore_relations']
  186.             );
  187.         } catch (SecurityError $e) {
  188.             $e->setSourceContext($this->source);
  189.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  190.                 $e->setTemplateLine($tags[$e->getTagName()]);
  191.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  192.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  193.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  194.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  195.             }
  196.             throw $e;
  197.         }
  198.     }
  199. }