var/cache/dev/twig/eb/eb68708603c6963e2558334637d1073f0fb4ee1964afe04718bc7a9dff61338b.php line 54

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. /* front_v4/mca/blog/_balise_schema_org.html.twig */
  14. class __TwigTemplate_ad6a0f984efafaee3f7ac5206bcdffe1e029ff26e5c9fb799be41a988ab89042 extends \Twig\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""front_v4/mca/blog/_balise_schema_org.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""front_v4/mca/blog/_balise_schema_org.html.twig"));
  33.         // line 2
  34.         if (twig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'2$this->source); })()), "blogAuthor", [], "any"falsefalsefalse2)) {
  35.             // line 3
  36.             echo "    <meta name=\"author\" content=\"";
  37.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'3$this->source); })()), "blogAuthor", [], "any"falsefalsefalse3), "fullName", [], "any"falsefalsefalse3), "html"nulltrue);
  38.             echo "\">
  39. ";
  40.         }
  41.         // line 5
  42.         if (twig_get_attribute($this->env$this->source, (isset($context["blogPost"]) || array_key_exists("blogPost"$context) ? $context["blogPost"] : (function () { throw new RuntimeError('Variable "blogPost" does not exist.'5$this->source); })()), "filename", [], "any"falsefalsefalse5)) {
  43.             // line 6
  44.             echo "    ";
  45.             $context["post_image_url"] = $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->env->getRuntime('Vich\UploaderBundle\Twig\Extension\UploaderExtensionRuntime')->asset((isset($context["blogPost"]) || array_key_exists("blogPost"$context) ? $context["blogPost"] : (function () { throw new RuntimeError('Variable "blogPost" does not exist.'6$this->source); })()), "imageFile"), "blog_post_main");
  46.         }
  47.         // line 8
  48.         echo "<meta property=\"og:type\" content=\"article\">
  49. <meta property=\"og:title\" content=\"";
  50.         // line 9
  51.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'9$this->source); })()), "title", [], "any"falsefalsefalse9), "html"nulltrue);
  52.         echo "\">
  53. <meta property=\"og:image\" content=\"";
  54.         // line 10
  55.         echo twig_escape_filter($this->env, (isset($context["post_image_url"]) || array_key_exists("post_image_url"$context) ? $context["post_image_url"] : (function () { throw new RuntimeError('Variable "post_image_url" does not exist.'10$this->source); })()), "html"nulltrue);
  56.         echo "\">
  57. <meta property=\"article:published_time\" content=\"";
  58.         // line 11
  59.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'11$this->source); })()), "createdAt", [], "any"falsefalsefalse11), "Y-m-d"), "html"nulltrue);
  60.         echo "\">
  61. ";
  62.         // line 12
  63.         if (twig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'12$this->source); })()), "metaCustom", [], "any"falsefalsefalse12)) {
  64.             // line 13
  65.             echo "    ";
  66.             echo twig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'13$this->source); })()), "metaCustom", [], "any"falsefalsefalse13);
  67.             echo "
  68. ";
  69.         }
  70.         // line 15
  71.         echo "<script type=\"application/ld+json\">
  72.     {
  73.         \"@context\": \"https://schema.org\",
  74.         \"@type\": \"Article\",
  75.         \"@id\": \"Article-";
  76.         // line 19
  77.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'19$this->source); })()), "id", [], "any"falsefalsefalse19), "html"nulltrue);
  78.         echo "\",
  79.         \"mainEntityOfPage\": {
  80.             \"@type\": \"WebPage\",
  81.             \"@id\": \"";
  82.         // line 22
  83.         echo twig_escape_filter($this->env, ((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.'22$this->source); })()), "request", [], "any"falsefalsefalse22), "getSchemeAndHttpHost", [], "any"falsefalsefalse22) . 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.'22$this->source); })()), "request", [], "any"falsefalsefalse22), "baseUrl", [], "any"falsefalsefalse22)) . 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.'22$this->source); })()), "request", [], "any"falsefalsefalse22), "pathInfo", [], "any"falsefalsefalse22)), "html"nulltrue);
  84.         echo "\"
  85.         },
  86.         \"headline\": \"";
  87.         // line 24
  88.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'24$this->source); })()), "metaTitle", [], "any"falsefalsefalse24), "html"nulltrue);
  89.         echo "\",
  90.         \"description\": \"";
  91.         // line 25
  92.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'25$this->source); })()), "metaDescription", [], "any"falsefalsefalse25), "html"nulltrue);
  93.         echo "\",
  94.         \"image\": \"";
  95.         // line 26
  96.         echo twig_escape_filter($this->env, (isset($context["post_image_url"]) || array_key_exists("post_image_url"$context) ? $context["post_image_url"] : (function () { throw new RuntimeError('Variable "post_image_url" does not exist.'26$this->source); })()), "html"nulltrue);
  97.         echo "\",
  98.     ";
  99.         // line 27
  100.         if (twig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'27$this->source); })()), "blogAuthor", [], "any"falsefalsefalse27)) {
  101.             // line 28
  102.             echo "        \"author\": {
  103.             \"@type\": \"Person\",
  104.             \"name\": \"";
  105.             // line 30
  106.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'30$this->source); })()), "blogAuthor", [], "any"falsefalsefalse30), "fullName", [], "any"falsefalsefalse30), "html"nulltrue);
  107.             echo "\"
  108.         },
  109.     ";
  110.         }
  111.         // line 33
  112.         echo "    \"publisher\": {
  113.         \"@type\": \"Organization\",
  114.         \"name\": \"Mon centre auditif\",
  115.         \"logo\": {
  116.             \"@type\": \"ImageObject\",
  117.             \"url\": \"https://mon-centre-auditif.com/build/mca_logo_horizontal.png\"
  118.         }
  119.     },
  120.     \"datePublished\": \"";
  121.         // line 41
  122.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'41$this->source); })()), "createdAt", [], "any"falsefalsefalse41), "Y-m-d"), "html"nulltrue);
  123.         echo "\",
  124.     \"dateModified\": \"";
  125.         // line 42
  126.         echo twig_escape_filter($this->envtwig_date_format_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'42$this->source); })()), "updatedAt", [], "any"falsefalsefalse42), "Y-m-d"), "html"nulltrue);
  127.         echo "\"
  128.     ";
  129.         // line 43
  130.         if (twig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'43$this->source); })()), "metaSchema", [], "any"falsefalsefalse43)) {
  131.             // line 44
  132.             echo "      ,
  133.       ";
  134.             // line 45
  135.             echo twig_slice($this->envtwig_get_attribute($this->env$this->source, (isset($context["post"]) || array_key_exists("post"$context) ? $context["post"] : (function () { throw new RuntimeError('Variable "post" does not exist.'45$this->source); })()), "metaSchema", [], "any"falsefalsefalse45), 1,  -1);
  136.             echo "
  137.     ";
  138.         }
  139.         // line 47
  140.         echo "}
  141. </script>";
  142.         
  143.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  144.         
  145.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  146.     }
  147.     public function getTemplateName()
  148.     {
  149.         return "front_v4/mca/blog/_balise_schema_org.html.twig";
  150.     }
  151.     public function isTraitable()
  152.     {
  153.         return false;
  154.     }
  155.     public function getDebugInfo()
  156.     {
  157.         return array (  149 => 47,  144 => 45,  141 => 44,  139 => 43,  135 => 42,  131 => 41,  121 => 33,  115 => 30,  111 => 28,  109 => 27,  105 => 26,  101 => 25,  97 => 24,  92 => 22,  86 => 19,  80 => 15,  74 => 13,  72 => 12,  68 => 11,  64 => 10,  60 => 9,  57 => 8,  53 => 6,  51 => 5,  45 => 3,  43 => 2,);
  158.     }
  159.     public function getSourceContext()
  160.     {
  161.         return new Source("{# Post author #}
  162. {% if post.blogAuthor %}
  163.     <meta name=\"author\" content=\"{{ post.blogAuthor.fullName }}\">
  164. {% endif %}
  165. {% if blogPost.filename %}
  166.     {% set post_image_url = vich_uploader_asset(blogPost, 'imageFile') | imagine_filter('blog_post_main') %}
  167. {% endif %}
  168. <meta property=\"og:type\" content=\"article\">
  169. <meta property=\"og:title\" content=\"{{ post.title }}\">
  170. <meta property=\"og:image\" content=\"{{ post_image_url }}\">
  171. <meta property=\"article:published_time\" content=\"{{ post.createdAt|date('Y-m-d') }}\">
  172. {% if post.metaCustom %}
  173.     {{ post.metaCustom|raw }}
  174. {% endif %}
  175. <script type=\"application/ld+json\">
  176.     {
  177.         \"@context\": \"https://schema.org\",
  178.         \"@type\": \"Article\",
  179.         \"@id\": \"Article-{{ post.id }}\",
  180.         \"mainEntityOfPage\": {
  181.             \"@type\": \"WebPage\",
  182.             \"@id\": \"{{ app.request.getSchemeAndHttpHost ~ app.request.baseUrl ~ app.request.pathInfo }}\"
  183.         },
  184.         \"headline\": \"{{ post.metaTitle }}\",
  185.         \"description\": \"{{ post.metaDescription }}\",
  186.         \"image\": \"{{ post_image_url }}\",
  187.     {% if post.blogAuthor %}
  188.         \"author\": {
  189.             \"@type\": \"Person\",
  190.             \"name\": \"{{ post.blogAuthor.fullName }}\"
  191.         },
  192.     {% endif %}
  193.     \"publisher\": {
  194.         \"@type\": \"Organization\",
  195.         \"name\": \"Mon centre auditif\",
  196.         \"logo\": {
  197.             \"@type\": \"ImageObject\",
  198.             \"url\": \"https://mon-centre-auditif.com/build/mca_logo_horizontal.png\"
  199.         }
  200.     },
  201.     \"datePublished\": \"{{ post.createdAt|date('Y-m-d') }}\",
  202.     \"dateModified\": \"{{ post.updatedAt|date('Y-m-d') }}\"
  203.     {% if post.metaSchema %}
  204.       ,
  205.       {{ post.metaSchema[1:-1]|raw }}
  206.     {% endif %}
  207. }
  208. </script>""front_v4/mca/blog/_balise_schema_org.html.twig""/var/www/hearing_store_locator/templates/front_v4/mca/blog/_balise_schema_org.html.twig");
  209.     }
  210. }