<?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;
/* layouts/layout/html-head.html.twig */
class __TwigTemplate_c4d60d309aa496b6032da640ef2dc49b extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'metadata' => [$this, 'block_metadata'],
'headlink' => [$this, 'block_headlink'],
'headscripts' => [$this, 'block_headscripts'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
$this->deferred = $this->env->getExtension('Twig\DeferredExtension\DeferredExtension');
}
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", "layouts/layout/html-head.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "layouts/layout/html-head.html.twig"));
// line 1
echo "<meta charset=\"utf-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
";
// line 4
ob_start();
// line 5
echo " ";
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); })()))) {
// line 6
echo " ";
$context["document"] = Pimcore\Model\Document::getById(1);
// line 7
echo " ";
}
// line 8
echo "
";
// line 9
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")) {
// line 10
echo " ";
// line 11
echo " ";
$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", false, false, true, 11);
// line 12
echo " ";
}
// line 13
echo "
";
// line 14
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", false, false, true, 14))) {
// line 15
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_title')->getCallable()(), "set", [0 => 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", false, false, true, 15)], "method", false, false, true, 15);
// line 16
echo " ";
}
// line 17
echo "
";
// line 18
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", false, false, true, 18))) {
// line 19
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setDescription", [0 => 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", false, false, true, 19)], "method", false, false, true, 19);
// line 20
echo " ";
}
// line 21
echo "
";
// line 22
$this->displayBlock('metadata', $context, $blocks);
// line 42
echo "
";
// line 43
$this->loadTemplate("layouts/layout/html-head-styles.html.twig", "layouts/layout/html-head.html.twig", 43)->display($context);
// line 44
echo " ";
$this->loadTemplate("layouts/layout/html-head-scripts.html.twig", "layouts/layout/html-head.html.twig", 44)->display($context);
// line 45
echo "
";
// line 46
$this->loadTemplate("layouts/layout/favicons.html.twig", "layouts/layout/html-head.html.twig", 46)->display($context);
$___internal_parse_0_ = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 4
echo twig_spaceless($___internal_parse_0_);
// line 48
echo "<script>
var jsLanguage = '";
// line 49
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_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", false, false, true, 49), "locale", [], "any", false, false, true, 49), 49, $this->source), "html", null, true);
echo "';
</script>
";
// line 53
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "captureStart", [], "method", false, false, true, 53);
// line 61
echo "
";
// line 63
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "captureEnd", [], "method", false, false, true, 63);
// line 64
$this->displayBlock('headlink', $context, $blocks);
// line 67
$this->displayBlock('headscripts', $context, $blocks);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$this->deferred->resolve($this, $context, $blocks);
}
// line 22
public function block_metadata($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(), "block", "metadata"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metadata"));
// line 23
echo " ";
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))) {
// line 24
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_title')->getCallable()(), "prepend", [0 => (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", false, false, true, 24);
// line 25
echo " ";
}
// line 26
echo "
";
// line 27
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))) {
// line 28
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setDescription", [0 => (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", false, false, true, 28);
// line 29
echo " ";
}
// line 30
echo "
";
// line 31
if ( !twig_test_empty($this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("site_title"))) {
// line 32
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_title')->getCallable()(), "append", [0 => $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("site_title")], "method", false, false, true, 32);
// line 33
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_title')->getCallable()(), "setSeparator", [0 => " | "], "method", false, false, true, 33);
// line 34
echo " ";
}
// line 35
echo "
";
// line 36
echo $this->env->getFunction('pimcore_head_title')->getCallable()();
echo "
";
// line 37
echo $this->env->getFunction('pimcore_head_meta')->getCallable()();
echo "
";
// line 38
if (twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_placeholder')->getCallable()("canonical"), "count", [], "method", false, false, true, 38)) {
// line 39
echo " <link rel=\"canonical\" href=\"";
echo $this->env->getFunction('pimcore_placeholder')->getCallable()("canonical");
echo "\"/>
";
}
// line 41
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function block_headlink($context, array $blocks = [])
{
$this->deferred->defer($this, 'headlink');
}
// line 64
public function block_headlink_deferred($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(), "block", "headlink"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "headlink"));
// line 65
echo " ";
echo $this->env->getFunction('pimcore_head_link')->getCallable()();
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$this->deferred->resolve($this, $context, $blocks);
}
public function block_headscripts($context, array $blocks = [])
{
$this->deferred->defer($this, 'headscripts');
}
// line 67
public function block_headscripts_deferred($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(), "block", "headscripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "headscripts"));
// line 68
echo " ";
echo $this->env->getFunction('pimcore_head_script')->getCallable()();
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$this->deferred->resolve($this, $context, $blocks);
}
public function getTemplateName()
{
return "layouts/layout/html-head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("<meta charset=\"utf-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
{% apply spaceless %}
{% if not document is defined or not document %}
{% set document = pimcore_document(1) %}
{% endif %}
{% if document is instanceof('\\\\Pimcore\\\\Model\\\\Document\\\\Link') %}
{# @var document \\Pimcore\\Model\\Document\\Link #}
{% set document = document.getObject() %}
{% endif %}
{% if document.getTitle() is not empty %}
{% do pimcore_head_title().set(document.getTitle()) %}
{% endif %}
{% if document.getDescription() is not empty %}
{% do pimcore_head_meta().setDescription(document.getDescription()) %}
{% endif %}
{% block metadata %}
{% if head_title|default(null) %}
{% do pimcore_head_title().prepend(head_title) %}
{% endif %}
{% if head_description|default(null) %}
{% do pimcore_head_meta().setDescription(head_description) %}
{% endif %}
{% if pimcore_website_config('site_title') is not empty %}
{% do pimcore_head_title().append(pimcore_website_config('site_title')) %}
{% do pimcore_head_title().setSeparator(' | ') %}
{% endif %}
{{ pimcore_head_title() }}
{{ pimcore_head_meta() }}
{% if pimcore_placeholder('canonical').count() %}
<link rel=\"canonical\" href=\"{{ pimcore_placeholder('canonical') }}\"/>
{% endif %}
{% endblock %}
{% include 'layouts/layout/html-head-styles.html.twig' %}
{% include 'layouts/layout/html-head-scripts.html.twig' %}
{% include 'layouts/layout/favicons.html.twig' %}
{% endapply %}
<script>
var jsLanguage = '{{ app.request.locale }}';
</script>
{% do pimcore_head_script().captureStart() %}
{#
\$(function(\$){
Storme.loadClass('general');
{% if loadJsForAction()|length > 0 %}
Storme.callAction('{{ loadJsForAction()|first }}','{{ loadJsForAction()|last }}');
{% endif %}
});#}
{% do pimcore_head_script().captureEnd() %}
{% block headlink deferred %}
{{ pimcore_head_link() }}
{% endblock %}
{% block headscripts deferred %}
{{ pimcore_head_script() }}
{% endblock %}", "layouts/layout/html-head.html.twig", "/var/www/clients/client2/web45/web/pc/templates/layouts/layout/html-head.html.twig");
}
public function checkSecurity()
{
static $tags = array("apply" => 4, "if" => 5, "set" => 6, "do" => 15, "block" => 22, "include" => 43);
static $filters = array("spaceless" => 4, "escape" => 49, "default" => 23);
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);
try {
$this->sandbox->checkSecurity(
['apply', 'if', 'set', 'do', 'block', 'include'],
['spaceless', 'escape', 'default'],
['pimcore_document', 'pimcore_head_title', 'pimcore_head_meta', 'pimcore_head_script', 'pimcore_website_config', 'pimcore_placeholder', 'pimcore_head_link']
);
} 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;
}
}
private $deferred;
}