var/cache/dev/twig/68/684789d510fd443387d0fc6265b0957d.php line 92

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. /* includes/macros.html.twig */
  14. class __TwigTemplate_9746abb265005f3bcce40321f7b87b51 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_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""includes/macros.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""includes/macros.html.twig"));
  33.         
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  35.         
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  37.     }
  38.     // line 1
  39.     public function macro_image_link($__image__ null$__editmode__ false$__linkThumbnail__ "galleryLightbox", ...$__varargs__)
  40.     {
  41.         $macros $this->macros;
  42.         $context $this->env->mergeGlobals([
  43.             "image" => $__image__,
  44.             "editmode" => $__editmode__,
  45.             "linkThumbnail" => $__linkThumbnail__,
  46.             "varargs" => $__varargs__,
  47.         ]);
  48.         $blocks = [];
  49.         ob_start();
  50.         try {
  51.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""image_link"));
  53.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""image_link"));
  55.             // line 2
  56.             echo "
  57.     ";
  58.             // line 4
  59.             echo "    ";
  60.             $context["hasLink"] = ( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'4$this->source); })()) &&  !twig_test_empty((isset($context["linkThumbnail"]) || array_key_exists("linkThumbnail"$context) ? $context["linkThumbnail"] : (function () { throw new RuntimeError('Variable "linkThumbnail" does not exist.'4$this->source); })())));
  61.             // line 5
  62.             echo "
  63.     ";
  64.             // line 6
  65.             if ((isset($context["hasLink"]) || array_key_exists("hasLink"$context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.'6$this->source); })())) {
  66.                 // line 7
  67.                 echo "        <a href=\"";
  68.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'7$this->source); })()), "getThumbnail", [=> (isset($context["linkThumbnail"]) || array_key_exists("linkThumbnail"$context) ? $context["linkThumbnail"] : (function () { throw new RuntimeError('Variable "linkThumbnail" does not exist.'7$this->source); })())], "method"falsefalsefalse7), "html"nulltrue);
  69.                 echo "\" class=\"thumbnail\">
  70.     ";
  71.             }
  72.             // line 9
  73.             echo "
  74.     ";
  75.             // line 10
  76.             echo (isset($context["image"]) || array_key_exists("image"$context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.'10$this->source); })());
  77.             echo "
  78.     ";
  79.             // line 12
  80.             if ((isset($context["hasLink"]) || array_key_exists("hasLink"$context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.'12$this->source); })())) {
  81.                 // line 13
  82.                 echo "        </a>
  83.     ";
  84.             }
  85.             // line 15
  86.             echo "
  87. ";
  88.             
  89.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  90.             
  91.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  92.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  93.         } finally {
  94.             ob_end_clean();
  95.         }
  96.     }
  97.     public function getTemplateName()
  98.     {
  99.         return "includes/macros.html.twig";
  100.     }
  101.     public function isTraitable()
  102.     {
  103.         return false;
  104.     }
  105.     public function getDebugInfo()
  106.     {
  107.         return array (  103 => 15,  99 => 13,  97 => 12,  92 => 10,  89 => 9,  83 => 7,  81 => 6,  78 => 5,  75 => 4,  72 => 2,  51 => 1,);
  108.     }
  109.     public function getSourceContext()
  110.     {
  111.         return new Source("{% macro image_link(image, editmode = false, linkThumbnail = 'galleryLightbox') %}
  112.     {# @var image \\Pimcore\\Model\\Document\\Tag\\Image #}
  113.     {% set hasLink = not editmode and linkThumbnail is not empty %}
  114.     {% if hasLink %}
  115.         <a href=\"{{ image.getThumbnail(linkThumbnail) }}\" class=\"thumbnail\">
  116.     {% endif %}
  117.     {{ image|raw }}
  118.     {% if hasLink %}
  119.         </a>
  120.     {% endif %}
  121. {% endmacro %}
  122. ""includes/macros.html.twig""/var/www/html/siteone/templates/includes/macros.html.twig");
  123.     }
  124. }