var/cache/dev/twig/bb/bb32820f5573a1076ac6033a0011d77a3db3682d7723e044fbd3f9cfa9c47237.php line 107

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. /* document/areabricks/link-brick/view.html.twig */
  14. class __TwigTemplate_d60e5bd3c9a54a10d48af3ebb8369df7d448de11fd31dcb574d4257b506c75c5 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.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""document/areabricks/link-brick/view.html.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""document/areabricks/link-brick/view.html.twig"));
  33.         // line 1
  34.         $context["columnCount"] = ((twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select""columnCount"), "getData", [], "method"truetruefalse1)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"select""columnCount"), "getData", [], "method"falsefalsefalse1), 1)) : (1));
  35.         // line 2
  36.         $context["gridClasses"] = "grid-cols-1";
  37.         // line 3
  38.         if ((((isset($context["columnCount"]) || array_key_exists("columnCount"$context) ? $context["columnCount"] : (function () { throw new RuntimeError('Variable "columnCount" does not exist.'3$this->source); })()) % 3) == 0)) {
  39.             // line 4
  40.             echo "    ";
  41.             $context["gridClasses"] = ((isset($context["gridClasses"]) || array_key_exists("gridClasses"$context) ? $context["gridClasses"] : (function () { throw new RuntimeError('Variable "gridClasses" does not exist.'4$this->source); })()) . " lg:grid-cols-3");
  42.         } elseif (((        // line 5
  43. (isset($context["columnCount"]) || array_key_exists("columnCount"$context) ? $context["columnCount"] : (function () { throw new RuntimeError('Variable "columnCount" does not exist.'5$this->source); })()) % 2) == 0)) {
  44.             // line 6
  45.             echo "    ";
  46.             $context["gridClasses"] = ((isset($context["gridClasses"]) || array_key_exists("gridClasses"$context) ? $context["gridClasses"] : (function () { throw new RuntimeError('Variable "gridClasses" does not exist.'6$this->source); })()) . " lg:grid-cols-2");
  47.         }
  48.         // line 8
  49.         echo "
  50. <div class=\"grid ";
  51.         // line 9
  52.         echo twig_escape_filter($this->env, (isset($context["gridClasses"]) || array_key_exists("gridClasses"$context) ? $context["gridClasses"] : (function () { throw new RuntimeError('Variable "gridClasses" does not exist.'9$this->source); })()), "html"nulltrue);
  53.         echo " mx-auto gap-3 py-3 px-2 bg-white\">
  54.     ";
  55.         // line 10
  56.         $context['_parent'] = $context;
  57.         $context['_seq'] = twig_ensure_traversable(range(1, (isset($context["columnCount"]) || array_key_exists("columnCount"$context) ? $context["columnCount"] : (function () { throw new RuntimeError('Variable "columnCount" does not exist.'10$this->source); })())));
  58.         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
  59.             // line 11
  60.             echo "        <div class=\"relative h-56 overflow-hidden bg-center bg-cover md:h-64\"
  61.             ";
  62.             // line 12
  63.             if ( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'12$this->source); })())) {
  64.                 // line 13
  65.                 echo "                ";
  66.                 $context["image"] = twig_get_attribute($this->env$this->source$this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image", ("background-" $context["i"])), "getThumbnail", [=> "targetaudience-background"], "method"falsefalsefalse13);
  67.                 // line 14
  68.                 echo "                style=\"background-image: url('";
  69.                 echo twig_escape_filter($this->env, (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'14$this->source); })()), "html"nulltrue);
  70.                 echo "');\"
  71.                 href=\"#\"
  72.             ";
  73.             }
  74.             // line 17
  75.             echo "        >
  76.             ";
  77.             // line 18
  78.             if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'18$this->source); })())) {
  79.                 // line 19
  80.                 echo "                ";
  81.                 echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"image", ("background-" $context["i"]), ["thumbnail" => "targetaudience-background""class" => "w-full"]);
  82.                 // line 22
  83.                 echo "
  84.             ";
  85.             }
  86.             // line 24
  87.             echo "              ";
  88.             $context["link"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context"link", ("link" $context["i"]), ["placeholder" => "Link""class" => "flex items-center pt-1"]);
  89.             // line 28
  90.             echo "
  91.             ";
  92.             // line 29
  93.             if (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'29$this->source); })()) || ( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'29$this->source); })()) && twig_get_attribute($this->env$this->source, (isset($context["link"]) || array_key_exists("link"$context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.'29$this->source); })()), "text", [], "any"falsefalsefalse29)))) {
  94.                 // line 30
  95.                 echo "            <div class=\"absolute z-10 transform -translate-x-1/2 -translate-y-1/2\" style=\"top: 50%; left: 50%;\">
  96.                 ";
  97.                 // line 31
  98.                 $this->loadTemplate("component/button.html.twig""document/areabricks/link-brick/view.html.twig"31)->display(twig_to_array(["text" => (((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'31$this->source); })())) ? ((isset($context["link"]) || array_key_exists("link"$context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.'31$this->source); })())) : (twig_get_attribute($this->env$this->source, (isset($context["link"]) || array_key_exists("link"$context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.'31$this->source); })()), "text", [], "any"falsefalsefalse31))), "type" => "primary""icon_after" => "arrow-right-tail""attr" => ["href" => twig_get_attribute($this->env$this->source, (isset($context["link"]) || array_key_exists("link"$context) ? $context["link"] : (function () { throw new RuntimeError('Variable "link" does not exist.'31$this->source); })()), "href", [], "any"falsefalsefalse31)]]));
  99.                 // line 32
  100.                 echo "            </div>
  101.             ";
  102.             }
  103.             // line 34
  104.             echo "
  105.         </div>
  106.     ";
  107.         }
  108.         $_parent $context['_parent'];
  109.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
  110.         $context array_intersect_key($context$_parent) + $_parent;
  111.         // line 37
  112.         echo "</div>
  113. ";
  114.         
  115.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  116.         
  117.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  118.     }
  119.     public function getTemplateName()
  120.     {
  121.         return "document/areabricks/link-brick/view.html.twig";
  122.     }
  123.     public function isTraitable()
  124.     {
  125.         return false;
  126.     }
  127.     public function getDebugInfo()
  128.     {
  129.         return array (  121 => 37,  113 => 34,  109 => 32,  107 => 31,  104 => 30,  102 => 29,  99 => 28,  96 => 24,  92 => 22,  89 => 19,  87 => 18,  84 => 17,  77 => 14,  74 => 13,  72 => 12,  69 => 11,  65 => 10,  61 => 9,  58 => 8,  54 => 6,  52 => 5,  49 => 4,  47 => 3,  45 => 2,  43 => 1,);
  130.     }
  131.     public function getSourceContext()
  132.     {
  133.         return new Source("{% set columnCount = pimcore_select('columnCount').getData()|default(1) %}
  134. {% set gridClasses = 'grid-cols-1' %}
  135. {% if columnCount % 3 == 0 %}
  136.     {% set gridClasses = gridClasses ~ ' lg:grid-cols-3' %}
  137. {% elseif columnCount % 2 == 0 %}
  138.     {% set gridClasses = gridClasses ~ ' lg:grid-cols-2' %}
  139. {% endif %}
  140. <div class=\"grid {{ gridClasses }} mx-auto gap-3 py-3 px-2 bg-white\">
  141.     {% for i in range(1, columnCount) %}
  142.         <div class=\"relative h-56 overflow-hidden bg-center bg-cover md:h-64\"
  143.             {% if not editmode %}
  144.                 {% set image = pimcore_image(\"background-\" ~ i).getThumbnail('targetaudience-background') %}
  145.                 style=\"background-image: url('{{ image }}');\"
  146.                 href=\"#\"
  147.             {% endif %}
  148.         >
  149.             {% if editmode %}
  150.                 {{ pimcore_image(\"background-\" ~ i, {
  151.                     \"thumbnail\": \"targetaudience-background\",
  152.                     \"class\": \"w-full\",
  153.                 }) }}
  154.             {% endif %}
  155.               {% set link = pimcore_link(\"link\" ~ i, {
  156.                     'placeholder': 'Link',
  157.                     \"class\": \"flex items-center pt-1\",
  158.                 }) %}
  159.             {% if editmode or not editmode and link.text  %}
  160.             <div class=\"absolute z-10 transform -translate-x-1/2 -translate-y-1/2\" style=\"top: 50%; left: 50%;\">
  161.                 {% include \"component/button.html.twig\" with { text: editmode ? link : link.text, type: \"primary\", icon_after: 'arrow-right-tail', attr: { \"href\": link.href } } only %}
  162.             </div>
  163.             {% endif %}
  164.         </div>
  165.     {% endfor %}
  166. </div>
  167. ""document/areabricks/link-brick/view.html.twig""/var/www/vhosts/3forone.ch/httpdocs/abowire/templates/document/areabricks/link-brick/view.html.twig");
  168.     }
  169. }