<?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;
/* video-onpc/fiche.html.twig */
class __TwigTemplate_16073a2c9b2390ec81fe840d6518d5f8c9ef9489093f41bf2a2ea66f280bd0a6 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'head' => [$this, 'block_head'],
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "video-onpc/fiche.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "video-onpc/fiche.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "video-onpc/fiche.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 2
public function block_head($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "head"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "head"));
// line 3
echo " <script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"VideoObject\",
\"name\": \"";
// line 7
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 7, $this->source); })()), "titre", [], "any", false, false, false, 7), "html", null, true);
echo "\",
\"description\": \"";
// line 8
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 8, $this->source); })()), "texte", [], "any", false, false, false, 8), "html", null, true);
echo "\",
\"thumbnailUrl\": [
\"";
// line 10
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 10, $this->source); })()), "url", [], "any", false, false, false, 10), "html", null, true);
echo "\"
],
\"uploadDate\": \"";
// line 12
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 12, $this->source); })()), "dateMaj", [], "any", false, false, false, 12), "html", null, true);
echo "\",
\"contentUrl\": \"";
// line 13
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 13, $this->source); })()), "url", [], "any", false, false, false, 13), "html", null, true);
echo "\",
\"regionsAllowed\": \"FR\"
}
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 19
public function block_body($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 20
echo "<section class=\"container page-video single\">
<div id=\"breadcrumb\">
";
// line 22
$this->loadTemplate("video-onpc/_includes/breadcrumb.html.twig", "video-onpc/fiche.html.twig", 22)->display(twig_array_merge($context, ["lieu" => null, "video" => (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 22, $this->source); })())]));
// line 23
echo " </div>
<div class=\"title\">
<h1>";
// line 26
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 26, $this->source); })()), "titre", [], "any", false, false, false, 26), "html", null, true);
echo "</h1>
</div>
<section>
<article>
<div class=\"illustration text-center\">
<div class=\"vimeo-wrapper\" data-vimeo-id=\"";
// line 32
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 32, $this->source); })()), "idVimeo", [], "any", false, false, false, 32), "html", null, true);
echo "\">
<div class=\"vimeo-cover\">
<img src=\"";
// line 34
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Vich\UploaderBundle\Twig\Extension\UploaderExtension']->asset((isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 34, $this->source); })()), "photoFile"), "webtv_fiche"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 34, $this->source); })()), "titre", [], "any", false, false, false, 34), "html", null, true);
echo "\">
<button class=\"vimeo-play\" aria-label=\"Play video\"></button>
</div>
</div>
</div>
<div class=\"content pb-4\">
<div class=\"row\">
<div class=\"col\">
<p class=\"schedule\">
<small>Le ";
// line 45
echo twig_escape_filter($this->env, $this->extensions['Twig\Extra\Intl\IntlExtension']->formatDate($this->env, twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 45, $this->source); })()), "createdAt", [], "any", false, false, false, 45), "medium", "d MMMM Y"), "html", null, true);
echo "</small>
</p>
<p>";
// line 47
echo twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 47, $this->source); })()), "description", [], "any", false, false, false, 47);
echo "</p>
</div>
";
// line 49
if ((twig_get_attribute($this->env, $this->source, ($context["video"] ?? null), "annonceurs", [], "any", true, true, false, 49) && !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 49, $this->source); })()), "annonceurs", [], "any", false, false, false, 49)))) {
// line 50
echo " <div class=\"col-md-3 mt-2\">
<div class=\"container\">
<div class=\"row justify-content-md-center\">
";
// line 53
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["video"]) || array_key_exists("video", $context) ? $context["video"] : (function () { throw new RuntimeError('Variable "video" does not exist.', 53, $this->source); })()), "annonceurs", [], "any", false, false, false, 53));
foreach ($context['_seq'] as $context["_key"] => $context["etablissement"]) {
// line 54
echo " ";
$context["urlFiche"] = twig_get_attribute($this->env, $this->source, (isset($context["pathBuilder"]) || array_key_exists("pathBuilder", $context) ? $context["pathBuilder"] : (function () { throw new RuntimeError('Variable "pathBuilder" does not exist.', 54, $this->source); })()), "buildFiche", [0 => $context["etablissement"]], "method", false, false, false, 54);
// line 55
echo " ";
$context["imgAlt"] = twig_trim_filter(twig_join_filter([0 => twig_get_attribute($this->env, $this->source, // line 56
$context["etablissement"], "denomination", [], "any", false, false, false, 56), 1 => twig_get_attribute($this->env, $this->source, // line 57
$context["etablissement"], "codePostal", [], "any", false, false, false, 57), 2 => ((twig_get_attribute($this->env, $this->source, // line 58
$context["etablissement"], "ville", [], "any", false, false, false, 58)) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["etablissement"], "ville", [], "any", false, false, false, 58), "libelle", [], "any", false, false, false, 58)) : (""))], " - "), " -");
// line 60
echo " <div class=\"col-md-auto mb-2\">
<div class=\"text-center\">
<img src=\"";
// line 62
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Vich\UploaderBundle\Twig\Extension\UploaderExtension']->asset(twig_get_attribute($this->env, $this->source, $context["etablissement"], "logo", [], "any", false, false, false, 62), "logoFile"), "etab_hp_logo"), "html", null, true);
echo "\"
class=\"img-fluid mb-2\"
alt=\"";
// line 64
echo twig_escape_filter($this->env, (isset($context["imgAlt"]) || array_key_exists("imgAlt", $context) ? $context["imgAlt"] : (function () { throw new RuntimeError('Variable "imgAlt" does not exist.', 64, $this->source); })()), "html", null, true);
echo "\">
<p class=\"mb-0 fw-semibold\"><a href=\"";
// line 65
echo twig_escape_filter($this->env, (isset($context["urlFiche"]) || array_key_exists("urlFiche", $context) ? $context["urlFiche"] : (function () { throw new RuntimeError('Variable "urlFiche" does not exist.', 65, $this->source); })()), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["etablissement"], "denomination", [], "any", false, false, false, 65), "html", null, true);
echo "</a></p>
</div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['etablissement'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 69
echo " </div>
</div>
</div>
";
}
// line 73
echo " </div>
</div>
</article>
</section>
<p class=\"mb-4 pb-4\"> </p>
<p class=\"mb-4 pb-4\"> </p>
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 84
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 85
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script>
document.querySelectorAll('.vimeo-wrapper').forEach(wrapper => {
wrapper.addEventListener('click', () => {
const videoId = wrapper.dataset.vimeoId;
const iframe = document.createElement('iframe');
iframe.src =
`https://player.vimeo.com/video/\${videoId}?autoplay=1&muted=0&title=0&byline=0&portrait=0`;
iframe.allow = 'autoplay; fullscreen; picture-in-picture';
iframe.allowFullscreen = true;
wrapper.innerHTML = '';
wrapper.appendChild(iframe);
}, { once: true });
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "video-onpc/fiche.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 249 => 85, 239 => 84, 221 => 73, 215 => 69, 203 => 65, 199 => 64, 194 => 62, 190 => 60, 188 => 58, 187 => 57, 186 => 56, 184 => 55, 181 => 54, 177 => 53, 172 => 50, 170 => 49, 165 => 47, 160 => 45, 144 => 34, 139 => 32, 130 => 26, 125 => 23, 123 => 22, 119 => 20, 109 => 19, 94 => 13, 90 => 12, 85 => 10, 80 => 8, 76 => 7, 70 => 3, 60 => 2, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block head %}
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"VideoObject\",
\"name\": \"{{ video.titre }}\",
\"description\": \"{{ video.texte }}\",
\"thumbnailUrl\": [
\"{{ video.url }}\"
],
\"uploadDate\": \"{{ video.dateMaj }}\",
\"contentUrl\": \"{{ video.url }}\",
\"regionsAllowed\": \"FR\"
}
</script>
{% endblock %}
{% block body %}
<section class=\"container page-video single\">
<div id=\"breadcrumb\">
{% include 'video-onpc/_includes/breadcrumb.html.twig' with { lieu: null, video: video } %}
</div>
<div class=\"title\">
<h1>{{ video.titre }}</h1>
</div>
<section>
<article>
<div class=\"illustration text-center\">
<div class=\"vimeo-wrapper\" data-vimeo-id=\"{{ video.idVimeo }}\">
<div class=\"vimeo-cover\">
<img src=\"{{ vich_uploader_asset(video,'photoFile') | imagine_filter('webtv_fiche')}}\" alt=\"{{video.titre}}\">
<button class=\"vimeo-play\" aria-label=\"Play video\"></button>
</div>
</div>
</div>
<div class=\"content pb-4\">
<div class=\"row\">
<div class=\"col\">
<p class=\"schedule\">
<small>Le {{ video.createdAt | format_date(pattern='d MMMM Y') }}</small>
</p>
<p>{{ video.description | raw }}</p>
</div>
{% if video.annonceurs is defined and video.annonceurs is not empty %}
<div class=\"col-md-3 mt-2\">
<div class=\"container\">
<div class=\"row justify-content-md-center\">
{% for etablissement in video.annonceurs %}
{% set urlFiche = pathBuilder.buildFiche(etablissement) %}
{% set imgAlt = [
etablissement.denomination,
etablissement.codePostal,
(etablissement.ville ? etablissement.ville.libelle : ''),
]|join(' - ')|trim(' -') %}
<div class=\"col-md-auto mb-2\">
<div class=\"text-center\">
<img src=\"{{ vich_uploader_asset(etablissement.logo, 'logoFile') | imagine_filter('etab_hp_logo') }}\"
class=\"img-fluid mb-2\"
alt=\"{{ imgAlt }}\">
<p class=\"mb-0 fw-semibold\"><a href=\"{{ urlFiche }}\">{{ etablissement.denomination }}</a></p>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
</div>
</div>
</article>
</section>
<p class=\"mb-4 pb-4\"> </p>
<p class=\"mb-4 pb-4\"> </p>
</section>
{% endblock %}
{# Pour Vimeo #}
{% block javascripts %}
{{ parent() }}
<script>
document.querySelectorAll('.vimeo-wrapper').forEach(wrapper => {
wrapper.addEventListener('click', () => {
const videoId = wrapper.dataset.vimeoId;
const iframe = document.createElement('iframe');
iframe.src =
`https://player.vimeo.com/video/\${videoId}?autoplay=1&muted=0&title=0&byline=0&portrait=0`;
iframe.allow = 'autoplay; fullscreen; picture-in-picture';
iframe.allowFullscreen = true;
wrapper.innerHTML = '';
wrapper.appendChild(iframe);
}, { once: true });
});
</script>
{% endblock %}", "video-onpc/fiche.html.twig", "/app/templates/video-onpc/fiche.html.twig");
}
}