<?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;
/* @originales/block/m9_block.html.twig */
class __TwigTemplate_de6238bd78855256f92994e6549cd49574616e285fa68fc79d27d94df723e167 extends \eZ\Bundle\EzPublishDebugBundle\Twig\DebugTemplate
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "@originales/block/m9_block.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@originales/block/m9_block.html.twig"));
// line 1
echo "<div class=\"m-m9 ";
echo twig_escape_filter($this->env, $this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->getTranslatedFieldValue((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 1, $this->source); })()), "class_css"), "html", null, true);
echo "\"
";
// line 2
if ( !$this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->isFieldEmpty((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 2, $this->source); })()), "m9_bgcolor")) {
echo "style=\"background: ";
echo twig_escape_filter($this->env, $this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->getTranslatedFieldValue((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 2, $this->source); })()), "m9_bgcolor"), "html", null, true);
echo "\"";
}
echo ">
<div class=\"wrapper\">
<div class=\"internal-wrapper\">
";
// line 5
if ( !$this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->isFieldEmpty((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 5, $this->source); })()), "m9_icon")) {
// line 6
echo " ";
echo call_user_func_array($this->env->getFunction('ez_render_field')->getCallable(), [$this->env, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 6, $this->source); })()), "m9_icon", ["parameters" => ["class" => "icon"]]]);
echo "
";
}
// line 8
echo "
";
// line 9
if ( !$this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->isFieldEmpty((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 9, $this->source); })()), "m9_title")) {
// line 10
echo " <h2 class=\"h1\">";
echo $this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->getTranslatedFieldValue((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 10, $this->source); })()), "m9_title");
echo "</h2>
";
}
// line 12
echo "
";
// line 13
if ( !$this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->isFieldEmpty((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 13, $this->source); })()), "m9_subtitle")) {
// line 14
echo " <p class=\"h4\">";
echo $this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->getTranslatedFieldValue((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 14, $this->source); })()), "m9_subtitle");
echo "</p>
";
}
// line 16
echo "
";
// line 17
if ( !$this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->isFieldEmpty((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 17, $this->source); })()), "m9_link_relation")) {
// line 18
echo " ";
echo call_user_func_array($this->env->getFunction('ez_render_field')->getCallable(), [$this->env, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 18, $this->source); })()), "m9_link_relation", ["name" => call_user_func_array($this->env->getFunction('ez_render_field')->getCallable(), [$this->env, (isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 18, $this->source); })()), "m9_link_title"]), "class" => ""]]);
echo "
";
}
// line 20
echo " </div>
";
// line 21
if ((isset($context["pager"]) || array_key_exists("pager", $context))) {
// line 22
echo " <div class=\"grid\">
";
// line 23
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["pager"]) || array_key_exists("pager", $context) ? $context["pager"] : (function () { throw new RuntimeError('Variable "pager" does not exist.', 23, $this->source); })()), "currentPageResults", [], "any", false, false, false, 23));
foreach ($context['_seq'] as $context["_key"] => $context["child"]) {
// line 24
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("ez_content:viewLocation", ["locationId" => twig_get_attribute($this->env, $this->source, $context["child"], "id", [], "any", false, false, false, 24), "viewType" => "embed"]));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['child'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
echo " </div>
";
// line 27
if (twig_get_attribute($this->env, $this->source, (isset($context["pager"]) || array_key_exists("pager", $context) ? $context["pager"] : (function () { throw new RuntimeError('Variable "pager" does not exist.', 27, $this->source); })()), "haveToPaginate", [], "method", false, false, false, 27)) {
// line 28
echo " <div class=\"pagination\">
";
// line 29
echo $this->extensions['WhiteOctober\PagerfantaBundle\Twig\PagerfantaExtension']->renderPagerfanta((isset($context["pager"]) || array_key_exists("pager", $context) ? $context["pager"] : (function () { throw new RuntimeError('Variable "pager" does not exist.', 29, $this->source); })()), "simple", ["routeName" => (isset($context["parent"]) || array_key_exists("parent", $context) ? $context["parent"] : (function () { throw new RuntimeError('Variable "parent" does not exist.', 29, $this->source); })()), "block" => "m9_block"]);
echo "
</div>
";
}
// line 32
echo " ";
} elseif ( !$this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->isFieldEmpty((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 32, $this->source); })()), "m9_relation_list")) {
// line 33
echo "
<div class=\"grid\">
";
// line 35
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $this->extensions['eZ\Publish\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension']->getTranslatedFieldValue((isset($context["content"]) || array_key_exists("content", $context) ? $context["content"] : (function () { throw new RuntimeError('Variable "content" does not exist.', 35, $this->source); })()), "m9_relation_list"), "destinationContentIds", [], "any", false, false, false, 35));
foreach ($context['_seq'] as $context["_key"] => $context["contentId"]) {
// line 36
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("ez_content:viewAction", ["contentId" => $context["contentId"], "viewType" => "embed", "noLayout" => 1]));
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['contentId'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
echo " </div>
";
}
// line 40
echo " </div>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@originales/block/m9_block.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 158 => 40, 154 => 38, 145 => 36, 141 => 35, 137 => 33, 134 => 32, 128 => 29, 125 => 28, 123 => 27, 120 => 26, 111 => 24, 107 => 23, 104 => 22, 102 => 21, 99 => 20, 93 => 18, 91 => 17, 88 => 16, 82 => 14, 80 => 13, 77 => 12, 71 => 10, 69 => 9, 66 => 8, 60 => 6, 58 => 5, 48 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"m-m9 {{ ez_field_value( content, 'class_css') }}\"
{% if not ez_is_field_empty( content, 'm9_bgcolor' ) %}style=\"background: {{ ez_field_value(content, 'm9_bgcolor') }}\"{% endif %}>
<div class=\"wrapper\">
<div class=\"internal-wrapper\">
{% if not ez_is_field_empty( content, 'm9_icon' ) %}
{{ ez_render_field( content, 'm9_icon', {parameters: { class: 'icon' } }) }}
{% endif %}
{% if not ez_is_field_empty( content, 'm9_title' ) %}
<h2 class=\"h1\">{{ ez_field_value( content, 'm9_title')|raw }}</h2>
{% endif %}
{% if not ez_is_field_empty( content, 'm9_subtitle' ) %}
<p class=\"h4\">{{ ez_field_value( content, 'm9_subtitle')|raw }}</p>
{% endif %}
{% if not ez_is_field_empty( content, 'm9_link_relation' ) %}
{{ ez_render_field( content, 'm9_link_relation', { 'name': ez_render_field( content, 'm9_link_title'), class: '' }) }}
{% endif %}
</div>
{% if pager is defined %}
<div class=\"grid\">
{% for child in pager.currentPageResults %}
{{ render( controller( \"ez_content:viewLocation\", {\"locationId\": child.id, \"viewType\": \"embed\" } ) ) }}
{% endfor %}
</div>
{% if pager.haveToPaginate() %}
<div class=\"pagination\">
{{ pagerfanta( pager, 'simple', {'routeName': parent , 'block': 'm9_block' } ) }}
</div>
{% endif %}
{% elseif not ez_is_field_empty( content, 'm9_relation_list' ) %}
<div class=\"grid\">
{% for contentId in ez_field_value( content, 'm9_relation_list' ).destinationContentIds %}
{{ render( controller( \"ez_content:viewAction\", {'contentId': contentId, 'viewType': 'embed', 'noLayout': 1} ) ) }}
{% endfor %}
</div>
{% endif %}
</div>
</div>
", "@originales/block/m9_block.html.twig", "/var/www/app/Resources/views/themes/default/block/m9_block.html.twig");
}
}