var/cache/dev/twig/78/78462f819198f06fd0c3e9465ab64782.php line 116

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. /* layouts/layout/html-head.html.twig */
  14. class __TwigTemplate_c4d60d309aa496b6032da640ef2dc49b 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.             'metadata' => [$this'block_metadata'],
  25.             'headlink' => [$this'block_headlink'],
  26.             'headscripts' => [$this'block_headscripts'],
  27.         ];
  28.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  29.         $this->checkSecurity();
  30.         $this->deferred $this->env->getExtension('Twig\DeferredExtension\DeferredExtension');
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""layouts/layout/html-head.html.twig"));
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""layouts/layout/html-head.html.twig"));
  39.         // line 1
  40.         echo "<meta charset=\"utf-8\">
  41. <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
  42. ";
  43.         // line 4
  44.         ob_start();
  45.         // line 5
  46.         echo "    ";
  47.         if (( !array_key_exists("document"$context) ||  !(isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'5$this->source); })()))) {
  48.             // line 6
  49.             echo "        ";
  50.             $context["document"] = Pimcore\Model\Document::getById(1);
  51.             // line 7
  52.             echo "    ";
  53.         }
  54.         // line 8
  55.         echo "
  56.     ";
  57.         // line 9
  58.         if ($this->env->getTest('instanceof')->getCallable()((isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'9$this->source); })()), "\\Pimcore\\Model\\Document\\Link")) {
  59.             // line 10
  60.             echo "        ";
  61.             // line 11
  62.             echo "        ";
  63.             $context["document"] = 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.'11$this->source); })()), "getObject", [], "method"falsefalsetrue11);
  64.             // line 12
  65.             echo "    ";
  66.         }
  67.         // line 13
  68.         echo "
  69.     ";
  70.         // line 14
  71.         if ( !twig_test_empty(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.'14$this->source); })()), "getTitle", [], "method"falsefalsetrue14))) {
  72.             // line 15
  73.             echo "        ";
  74.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_title')->getCallable()(), "set", [=> 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); })()), "getTitle", [], "method"falsefalsetrue15)], "method"falsefalsetrue15);
  75.             // line 16
  76.             echo "    ";
  77.         }
  78.         // line 17
  79.         echo "
  80.     ";
  81.         // line 18
  82.         if ( !twig_test_empty(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.'18$this->source); })()), "getDescription", [], "method"falsefalsetrue18))) {
  83.             // line 19
  84.             echo "        ";
  85.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setDescription", [=> 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.'19$this->source); })()), "getDescription", [], "method"falsefalsetrue19)], "method"falsefalsetrue19);
  86.             // line 20
  87.             echo "    ";
  88.         }
  89.         // line 21
  90.         echo "
  91.     ";
  92.         // line 22
  93.         $this->displayBlock('metadata'$context$blocks);
  94.         // line 42
  95.         echo "
  96.     ";
  97.         // line 43
  98.         $this->loadTemplate("layouts/layout/html-head-styles.html.twig""layouts/layout/html-head.html.twig"43)->display($context);
  99.         // line 44
  100.         echo "    ";
  101.         $this->loadTemplate("layouts/layout/html-head-scripts.html.twig""layouts/layout/html-head.html.twig"44)->display($context);
  102.         // line 45
  103.         echo "
  104.     ";
  105.         // line 46
  106.         $this->loadTemplate("layouts/layout/favicons.html.twig""layouts/layout/html-head.html.twig"46)->display($context);
  107.         $___internal_parse_0_ = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  108.         // line 4
  109.         echo twig_spaceless($___internal_parse_0_);
  110.         // line 48
  111.         echo "<script>
  112.     var jsLanguage = '";
  113.         // line 49
  114.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'49$this->source); })()), "request", [], "any"falsefalsetrue49), "locale", [], "any"falsefalsetrue49), 49$this->source), "html"nulltrue);
  115.         echo "';
  116. </script>
  117. ";
  118.         // line 53
  119.         twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_script')->getCallable()(), "captureStart", [], "method"falsefalsetrue53);
  120.         // line 61
  121.         echo "
  122. ";
  123.         // line 63
  124.         twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_script')->getCallable()(), "captureEnd", [], "method"falsefalsetrue63);
  125.         // line 64
  126.         $this->displayBlock('headlink'$context$blocks);
  127.         // line 67
  128.         $this->displayBlock('headscripts'$context$blocks);
  129.         
  130.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  131.         
  132.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  133.         $this->deferred->resolve($this$context$blocks);
  134.     }
  135.     // line 22
  136.     public function block_metadata($context, array $blocks = [])
  137.     {
  138.         $macros $this->macros;
  139.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  140.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metadata"));
  141.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  142.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""metadata"));
  143.         // line 23
  144.         echo "        ";
  145.         if (((array_key_exists("head_title"$context)) ? (_twig_default_filter((isset($context["head_title"]) || array_key_exists("head_title"$context) ? $context["head_title"] : (function () { throw new RuntimeError('Variable "head_title" does not exist.'23$this->source); })()), null)) : (null))) {
  146.             // line 24
  147.             echo "            ";
  148.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_title')->getCallable()(), "prepend", [=> (isset($context["head_title"]) || array_key_exists("head_title"$context) ? $context["head_title"] : (function () { throw new RuntimeError('Variable "head_title" does not exist.'24$this->source); })())], "method"falsefalsetrue24);
  149.             // line 25
  150.             echo "        ";
  151.         }
  152.         // line 26
  153.         echo "
  154.         ";
  155.         // line 27
  156.         if (((array_key_exists("head_description"$context)) ? (_twig_default_filter((isset($context["head_description"]) || array_key_exists("head_description"$context) ? $context["head_description"] : (function () { throw new RuntimeError('Variable "head_description" does not exist.'27$this->source); })()), null)) : (null))) {
  157.             // line 28
  158.             echo "            ";
  159.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setDescription", [=> (isset($context["head_description"]) || array_key_exists("head_description"$context) ? $context["head_description"] : (function () { throw new RuntimeError('Variable "head_description" does not exist.'28$this->source); })())], "method"falsefalsetrue28);
  160.             // line 29
  161.             echo "        ";
  162.         }
  163.         // line 30
  164.         echo "
  165.         ";
  166.         // line 31
  167.         if ( !twig_test_empty($this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("site_title"))) {
  168.             // line 32
  169.             echo "            ";
  170.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_title')->getCallable()(), "append", [=> $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("site_title")], "method"falsefalsetrue32);
  171.             // line 33
  172.             echo "            ";
  173.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_title')->getCallable()(), "setSeparator", [=> " | "], "method"falsefalsetrue33);
  174.             // line 34
  175.             echo "        ";
  176.         }
  177.         // line 35
  178.         echo "
  179.         ";
  180.         // line 36
  181.         echo $this->env->getFunction('pimcore_head_title')->getCallable()();
  182.         echo "
  183.         ";
  184.         // line 37
  185.         echo $this->env->getFunction('pimcore_head_meta')->getCallable()();
  186.         echo "
  187.         ";
  188.         // line 38
  189.         if (twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_placeholder')->getCallable()("canonical"), "count", [], "method"falsefalsetrue38)) {
  190.             // line 39
  191.             echo "            <link rel=\"canonical\" href=\"";
  192.             echo $this->env->getFunction('pimcore_placeholder')->getCallable()("canonical");
  193.             echo "\"/>
  194.         ";
  195.         }
  196.         // line 41
  197.         echo "    ";
  198.         
  199.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  200.         
  201.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  202.     }
  203.     public function block_headlink($context, array $blocks = [])
  204.     {
  205.         $this->deferred->defer($this'headlink');
  206.     }
  207.     // line 64
  208.     public function block_headlink_deferred($context, array $blocks = [])
  209.     {
  210.         $macros $this->macros;
  211.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  212.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""headlink"));
  213.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  214.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""headlink"));
  215.         // line 65
  216.         echo "   ";
  217.         echo $this->env->getFunction('pimcore_head_link')->getCallable()();
  218.         echo "
  219. ";
  220.         
  221.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  222.         
  223.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  224.         $this->deferred->resolve($this$context$blocks);
  225.     }
  226.     public function block_headscripts($context, array $blocks = [])
  227.     {
  228.         $this->deferred->defer($this'headscripts');
  229.     }
  230.     // line 67
  231.     public function block_headscripts_deferred($context, array $blocks = [])
  232.     {
  233.         $macros $this->macros;
  234.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  235.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""headscripts"));
  236.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  237.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""headscripts"));
  238.         // line 68
  239.         echo "   ";
  240.         echo $this->env->getFunction('pimcore_head_script')->getCallable()();
  241.         echo "
  242. ";
  243.         
  244.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  245.         
  246.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  247.         $this->deferred->resolve($this$context$blocks);
  248.     }
  249.     public function getTemplateName()
  250.     {
  251.         return "layouts/layout/html-head.html.twig";
  252.     }
  253.     public function isTraitable()
  254.     {
  255.         return false;
  256.     }
  257.     public function getDebugInfo()
  258.     {
  259.         return array (  269 => 68,  259 => 67,  240 => 65,  230 => 64,  215 => 41,  209 => 39,  207 => 38,  203 => 37,  199 => 36,  196 => 35,  193 => 34,  190 => 33,  187 => 32,  185 => 31,  182 => 30,  179 => 29,  176 => 28,  174 => 27,  171 => 26,  168 => 25,  165 => 24,  162 => 23,  152 => 22,  141 => 67,  139 => 64,  137 => 63,  133 => 61,  131 => 53,  124 => 49,  121 => 48,  119 => 4,  116 => 46,  113 => 45,  110 => 44,  108 => 43,  105 => 42,  103 => 22,  100 => 21,  97 => 20,  94 => 19,  92 => 18,  89 => 17,  86 => 16,  83 => 15,  81 => 14,  78 => 13,  75 => 12,  72 => 11,  70 => 10,  68 => 9,  65 => 8,  62 => 7,  59 => 6,  56 => 5,  54 => 4,  49 => 1,);
  260.     }
  261.     public function getSourceContext()
  262.     {
  263.         return new Source("<meta charset=\"utf-8\">
  264. <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
  265. {% apply spaceless %}
  266.     {% if not document is defined or not document %}
  267.         {% set document = pimcore_document(1) %}
  268.     {% endif %}
  269.     {% if document is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Link') %}
  270.         {# @var document \\Pimcore\\Model\\Document\\Link #}
  271.         {% set document = document.getObject() %}
  272.     {% endif %}
  273.     {% if document.getTitle() is not empty %}
  274.         {% do pimcore_head_title().set(document.getTitle()) %}
  275.     {% endif %}
  276.     {% if document.getDescription() is not empty %}
  277.         {% do pimcore_head_meta().setDescription(document.getDescription()) %}
  278.     {% endif %}
  279.     {% block metadata %}
  280.         {% if head_title|default(null) %}
  281.             {% do pimcore_head_title().prepend(head_title) %}
  282.         {% endif %}
  283.         {% if head_description|default(null) %}
  284.             {% do pimcore_head_meta().setDescription(head_description) %}
  285.         {% endif %}
  286.         {% if pimcore_website_config('site_title') is not empty %}
  287.             {% do pimcore_head_title().append(pimcore_website_config('site_title')) %}
  288.             {% do pimcore_head_title().setSeparator(' | ') %}
  289.         {% endif %}
  290.         {{ pimcore_head_title() }}
  291.         {{ pimcore_head_meta() }}
  292.         {% if pimcore_placeholder('canonical').count() %}
  293.             <link rel=\"canonical\" href=\"{{ pimcore_placeholder('canonical') }}\"/>
  294.         {% endif %}
  295.     {% endblock %}
  296.     {% include 'layouts/layout/html-head-styles.html.twig' %}
  297.     {% include 'layouts/layout/html-head-scripts.html.twig' %}
  298.     {% include 'layouts/layout/favicons.html.twig' %}
  299. {% endapply %}
  300. <script>
  301.     var jsLanguage = '{{ app.request.locale }}';
  302. </script>
  303. {% do pimcore_head_script().captureStart() %}
  304. {#
  305. \$(function(\$){
  306. Storme.loadClass('general');
  307. {% if loadJsForAction()|length > 0 %}
  308.     Storme.callAction('{{ loadJsForAction()|first }}','{{ loadJsForAction()|last }}');
  309. {% endif %}
  310. });#}
  311. {% do pimcore_head_script().captureEnd() %}
  312. {% block headlink deferred %}
  313.    {{ pimcore_head_link() }}
  314. {% endblock %}
  315. {% block headscripts deferred %}
  316.    {{ pimcore_head_script() }}
  317. {% endblock %}""layouts/layout/html-head.html.twig""/var/www/clients/client2/web45/web/pc/templates/layouts/layout/html-head.html.twig");
  318.     }
  319.     
  320.     public function checkSecurity()
  321.     {
  322.         static $tags = array("apply" => 4"if" => 5"set" => 6"do" => 15"block" => 22"include" => 43);
  323.         static $filters = array("spaceless" => 4"escape" => 49"default" => 23);
  324.         static $functions = array("pimcore_document" => 6"pimcore_head_title" => 15"pimcore_head_meta" => 19"pimcore_head_script" => 53"pimcore_website_config" => 31"pimcore_placeholder" => 38"pimcore_head_link" => 65);
  325.         try {
  326.             $this->sandbox->checkSecurity(
  327.                 ['apply''if''set''do''block''include'],
  328.                 ['spaceless''escape''default'],
  329.                 ['pimcore_document''pimcore_head_title''pimcore_head_meta''pimcore_head_script''pimcore_website_config''pimcore_placeholder''pimcore_head_link']
  330.             );
  331.         } catch (SecurityError $e) {
  332.             $e->setSourceContext($this->source);
  333.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  334.                 $e->setTemplateLine($tags[$e->getTagName()]);
  335.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  336.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  337.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  338.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  339.             }
  340.             throw $e;
  341.         }
  342.     }
  343.     private $deferred;
  344. }