<?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;
/* elements/media-group-v2.html.twig */
class __TwigTemplate_3a9660dd87297da09bd7464f1830228506c15ad4460e27a340b874186c90d3b2 extends \Twig\Template
{
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", "elements/media-group-v2.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "elements/media-group-v2.html.twig"));
// line 2
echo "
";
// line 3
ob_start();
// line 4
echo "
";
// line 5
$context["items"] = twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 5, $this->source); })()), "items", [], "any", false, false, false, 5);
// line 6
echo "
";
// line 7
if ((twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 7, $this->source); })()), "class", [], "any", false, false, false, 7) == "gallery")) {
// line 8
echo "
\t";
// line 9
$context["placed"] = 0;
// line 10
echo "\t";
// line 11
echo "\t<div class=\"row mb-3\">
\t\t";
// line 12
if ( !twig_test_empty((isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 12, $this->source); })()))) {
// line 13
echo "\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(0, (twig_length_filter($this->env, (isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 13, $this->source); })())) - 1)));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 14
echo "\t\t\t\t";
$context["item"] = twig_get_attribute($this->env, $this->source, (isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 14, $this->source); })()), $context["i"], [], "array", false, false, false, 14);
// line 15
echo "\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 15, $this->source); })()), "isActive", [], "method", false, false, false, 15) && ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 15, $this->source); })()), "data", [], "any", false, false, false, 15), "getDisplayLimit", [], "method", false, false, false, 15) <= 0) || ((isset($context["placed"]) || array_key_exists("placed", $context) ? $context["placed"] : (function () { throw new RuntimeError('Variable "placed" does not exist.', 15, $this->source); })()) < twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 15, $this->source); })()), "data", [], "any", false, false, false, 15), "getDisplayLimit", [], "method", false, false, false, 15))))) {
// line 16
echo "\t\t\t\t\t";
if ((((isset($context["placed"]) || array_key_exists("placed", $context) ? $context["placed"] : (function () { throw new RuntimeError('Variable "placed" does not exist.', 16, $this->source); })()) != 0) && (0 == (isset($context["placed"]) || array_key_exists("placed", $context) ? $context["placed"] : (function () { throw new RuntimeError('Variable "placed" does not exist.', 16, $this->source); })()) % twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 16, $this->source); })()), "columns", [], "any", false, false, false, 16)))) {
// line 17
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"row mb-3\">
\t\t\t\t\t";
}
// line 20
echo "\t\t\t\t\t<div class=\"col-md-";
echo twig_escape_filter($this->env, (12 / twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 20, $this->source); })()), "columns", [], "any", false, false, false, 20)), "html", null, true);
echo "\" style=\"text-align: center;\" >
\t\t\t\t\t ";
// line 21
$context["media"] = twig_get_attribute($this->env, $this->source, (isset($context["item"]) || array_key_exists("item", $context) ? $context["item"] : (function () { throw new RuntimeError('Variable "item" does not exist.', 21, $this->source); })()), "getMedia", [], "method", false, false, false, 21);
// line 22
echo "\t\t\t\t\t\t<div class=\"media-block\">
\t\t\t\t\t\t";
// line 23
$this->loadTemplate("elements/media-items.html.twig", "elements/media-group-v2.html.twig", 23)->display($context);
// line 24
echo "\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t";
// line 26
$context["placed"] = ((isset($context["placed"]) || array_key_exists("placed", $context) ? $context["placed"] : (function () { throw new RuntimeError('Variable "placed" does not exist.', 26, $this->source); })()) + 1);
// line 27
echo "\t\t\t\t";
}
// line 28
echo "\t\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 29
echo "\t\t";
}
// line 30
echo "\t</div>
";
} else {
// line 33
echo "\t";
$context["placed"] = 0;
// line 34
echo "\t<div class=\"media-group\">
\t\t<div ";
// line 35
echo $this->extensions['App\Twig\RCSExtension']->get_attributes(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 35, $this->source); })()), "data", [], "any", false, false, false, 35), "getAttributes", [], "method", false, false, false, 35));
echo ">
\t\t";
// line 36
$context["uri"] = 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.', 36, $this->source); })()), "request", [], "any", false, false, false, 36), "getRequestUri", [], "method", false, false, false, 36);
// line 37
echo "\t\t";
$context["current_route"] = twig_get_attribute($this->env, $this->source, 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.', 37, $this->source); })()), "request", [], "any", false, false, false, 37), "attributes", [], "any", false, false, false, 37), "get", [0 => "_route"], "method", false, false, false, 37);
// line 38
echo "\t\t
\t\t";
// line 44
echo "
\t\t";
// line 46
echo "\t\t";
if ((twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 46, $this->source); })()), "position", [], "any", false, false, false, 46) == "ad-sidebar")) {
// line 47
echo "
\t\t\t";
// line 48
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Master\\ContentController::pinnedSidebarAd", ["base_url" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 51
(isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 51, $this->source); })()), "request", [], "any", false, false, false, 51), "getSchemeAndHttpHost", [], "method", false, false, false, 51), "uri" => // line 52
(isset($context["uri"]) || array_key_exists("uri", $context) ? $context["uri"] : (function () { throw new RuntimeError('Variable "uri" does not exist.', 52, $this->source); })()), "current_route" => // line 53
(isset($context["current_route"]) || array_key_exists("current_route", $context) ? $context["current_route"] : (function () { throw new RuntimeError('Variable "current_route" does not exist.', 53, $this->source); })())]));
// line 56
echo "
\t\t";
}
// line 59
echo "
\t\t
\t\t";
// line 61
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 61, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 62
echo "\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["item"], "isActive", [], "method", false, false, false, 62) && ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 62, $this->source); })()), "data", [], "any", false, false, false, 62), "getDisplayLimit", [], "method", false, false, false, 62) <= 0) || ((isset($context["placed"]) || array_key_exists("placed", $context) ? $context["placed"] : (function () { throw new RuntimeError('Variable "placed" does not exist.', 62, $this->source); })()) < twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 62, $this->source); })()), "data", [], "any", false, false, false, 62), "getDisplayLimit", [], "method", false, false, false, 62))))) {
// line 63
echo "\t\t\t\t";
$context["media"] = twig_get_attribute($this->env, $this->source, $context["item"], "getMedia", [], "method", false, false, false, 63);
// line 64
echo "\t\t\t\t<div class=\"media-block\">
\t\t\t\t";
// line 65
$this->loadTemplate("elements/media-items.html.twig", "elements/media-group-v2.html.twig", 65)->display($context);
// line 66
echo "\t\t\t\t</div>
\t\t\t\t";
// line 67
$context["placed"] = ((isset($context["placed"]) || array_key_exists("placed", $context) ? $context["placed"] : (function () { throw new RuntimeError('Variable "placed" does not exist.', 67, $this->source); })()) + 1);
// line 68
echo "\t\t\t";
}
// line 69
echo "\t\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 70
echo "\t\t";
if ((twig_get_attribute($this->env, $this->source, ($context["module"] ?? null), "show_buttons", [], "any", true, true, false, 70) && (twig_get_attribute($this->env, $this->source, (isset($context["module"]) || array_key_exists("module", $context) ? $context["module"] : (function () { throw new RuntimeError('Variable "module" does not exist.', 70, $this->source); })()), "show_buttons", [], "any", false, false, false, 70) == "yes"))) {
// line 71
echo "\t\t\t<nav class=\"\" style=\"text-align: center;\">
\t\t\t";
// line 72
$context["x"] = 0;
// line 73
echo "\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["items"]) || array_key_exists("items", $context) ? $context["items"] : (function () { throw new RuntimeError('Variable "items" does not exist.', 73, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 74
echo "\t\t\t\t";
if (twig_get_attribute($this->env, $this->source, $context["item"], "isActive", [], "method", false, false, false, 74)) {
// line 75
echo "\t\t\t\t\t<i class=\"fa fa-circle rotation-nav ";
if (((isset($context["x"]) || array_key_exists("x", $context) ? $context["x"] : (function () { throw new RuntimeError('Variable "x" does not exist.', 75, $this->source); })()) == 0)) {
echo "rotation-nav-active";
}
echo "\" data-slide=\"";
echo twig_escape_filter($this->env, (isset($context["x"]) || array_key_exists("x", $context) ? $context["x"] : (function () { throw new RuntimeError('Variable "x" does not exist.', 75, $this->source); })()), "html", null, true);
echo "\" style=\"padding:5px;\"></i>
\t\t\t\t\t";
// line 76
$context["x"] = ((isset($context["x"]) || array_key_exists("x", $context) ? $context["x"] : (function () { throw new RuntimeError('Variable "x" does not exist.', 76, $this->source); })()) + 1);
// line 77
echo "\t\t\t\t";
}
// line 78
echo "\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 79
echo "\t\t\t</nav>
\t\t";
}
// line 81
echo "\t\t</div>
\t</div>
";
}
echo trim(preg_replace('/>\s+</', '><', ob_get_clean()));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "elements/media-group-v2.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 276 => 81, 272 => 79, 266 => 78, 263 => 77, 261 => 76, 252 => 75, 249 => 74, 244 => 73, 242 => 72, 239 => 71, 236 => 70, 222 => 69, 219 => 68, 217 => 67, 214 => 66, 212 => 65, 209 => 64, 206 => 63, 203 => 62, 186 => 61, 182 => 59, 177 => 56, 175 => 53, 174 => 52, 173 => 51, 172 => 48, 169 => 47, 166 => 46, 163 => 44, 160 => 38, 157 => 37, 155 => 36, 151 => 35, 148 => 34, 145 => 33, 140 => 30, 137 => 29, 123 => 28, 120 => 27, 118 => 26, 114 => 24, 112 => 23, 109 => 22, 107 => 21, 102 => 20, 97 => 17, 94 => 16, 91 => 15, 88 => 14, 70 => 13, 68 => 12, 65 => 11, 63 => 10, 61 => 9, 58 => 8, 56 => 7, 53 => 6, 51 => 5, 48 => 4, 46 => 3, 43 => 2,);
}
public function getSourceContext()
{
return new Source("{# Media Group Element #}
{% spaceless %}
{% set items = module.items %}
{% if module.class == \"gallery\" %}
\t{% set placed = 0 %}
\t{#{% set items = module.data.getMediaGroupItems() %}#}
\t<div class=\"row mb-3\">
\t\t{% if items is not empty %}
\t\t\t{% for i in 0..items|length-1 %}
\t\t\t\t{% set item = items[i] %}
\t\t\t\t{% if item.isActive() and (module.data.getDisplayLimit() <= 0 or placed < module.data.getDisplayLimit()) %}
\t\t\t\t\t{% if placed != 0 and placed is divisible by(module.columns) %}
\t\t\t\t\t\t</div>
\t\t\t\t\t\t<div class=\"row mb-3\">
\t\t\t\t\t{% endif %}
\t\t\t\t\t<div class=\"col-md-{{ 12 / module.columns }}\" style=\"text-align: center;\" >
\t\t\t\t\t {% set media = item.getMedia() %}
\t\t\t\t\t\t<div class=\"media-block\">
\t\t\t\t\t\t{% include \"elements/media-items.html.twig\" %}
\t\t\t\t\t\t</div>
\t\t\t\t\t</div>
\t\t\t\t\t{% set placed = placed + 1 %}
\t\t\t\t{% endif %}
\t\t\t{% endfor %}
\t\t{% endif %}
\t</div>
{% else %}
\t{% set placed = 0 %}
\t<div class=\"media-group\">
\t\t<div {{ get_attributes(module.data.getAttributes()) }}>
\t\t{% set uri = app.request.getRequestUri() %}
\t\t{% set current_route = app.request.attributes.get('_route') %}
\t\t
\t\t{#
\t\tBase URL: {{ app.request.getSchemeAndHttpHost() }}
\t\tURI: {{ uri }}
\t\tCurrent Route: {{ current_route }}
\t\t#}
\t\t{# Pinned sidebar ad #}
\t\t{% if module.position == \"ad-sidebar\" %}
\t\t\t{{ render(controller(
\t\t\t\t'App\\\\Controller\\\\Master\\\\ContentController::pinnedSidebarAd',
\t\t\t\t{
\t\t\t\t\t'base_url': app.request.getSchemeAndHttpHost(),
\t\t\t\t\t'uri': uri,
\t\t\t\t\t'current_route': current_route
\t\t\t\t}
\t\t\t\t))
\t\t\t}}
\t\t{% endif %}
\t\t
\t\t{% for item in items %}
\t\t\t{% if item.isActive() and (module.data.getDisplayLimit() <= 0 or placed < module.data.getDisplayLimit()) %}
\t\t\t\t{% set media = item.getMedia() %}
\t\t\t\t<div class=\"media-block\">
\t\t\t\t{% include \"elements/media-items.html.twig\" %}
\t\t\t\t</div>
\t\t\t\t{% set placed = placed + 1 %}
\t\t\t{% endif %}
\t\t{% endfor %}
\t\t{% if module.show_buttons is defined and module.show_buttons == \"yes\" %}
\t\t\t<nav class=\"\" style=\"text-align: center;\">
\t\t\t{% set x = 0 %}
\t\t\t{% for item in items %}
\t\t\t\t{% if item.isActive() %}
\t\t\t\t\t<i class=\"fa fa-circle rotation-nav {% if x == 0 %}rotation-nav-active{% endif %}\" data-slide=\"{{x}}\" style=\"padding:5px;\"></i>
\t\t\t\t\t{% set x = x + 1 %}
\t\t\t\t{% endif %}
\t\t\t{% endfor %}
\t\t\t</nav>
\t\t{% endif %}
\t\t</div>
\t</div>
{% endif %}
{% endspaceless %}
", "elements/media-group-v2.html.twig", "/var/www/vhosts/rooferscoffeeshop.com/staging.rooferscoffeeshop.com/rcs-website/templates/elements/media-group-v2.html.twig");
}
}