<?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;
/* Cart/topNavCart.html.twig */
class __TwigTemplate_c3b417b808c0ad54d031dbc1d195e3a7 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
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", "Cart/topNavCart.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Cart/topNavCart.html.twig"));
// line 1
$context["isPortal"] = (array_key_exists("isPortal", $context) && (isset($context["isPortal"]) || array_key_exists("isPortal", $context) ? $context["isPortal"] : (function () { throw new RuntimeError('Variable "isPortal" does not exist.', 1, $this->source); })()));
// line 2
echo "<div class=\"tools\">
";
// line 3
if ((array_key_exists("FirstName", $context) && !twig_test_empty((isset($context["FirstName"]) || array_key_exists("FirstName", $context) ? $context["FirstName"] : (function () { throw new RuntimeError('Variable "FirstName" does not exist.', 3, $this->source); })())))) {
// line 4
echo " <div class=\"account-info\">
<div class=\"img-holder\">
<a href=\"#\"><img src=\"";
// line 7
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("website/static/images/profile-icon.png"), "html", null, true);
echo "\" alt=\"\" width=\"37\" height=\"37\"></a>
</div>
<div class=\"text\">
<span class=\"greeting\">";
// line 10
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.welcome"), "html", null, true);
echo ",</span>
<strong class=\"name\"><a href=\"#\">";
// line 11
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["FirstName"]) || array_key_exists("FirstName", $context) ? $context["FirstName"] : (function () { throw new RuntimeError('Variable "FirstName" does not exist.', 11, $this->source); })()), 11, $this->source), "html", null, true);
echo "</a></strong>
</div>
<div class=\"drop\">
<div class=\"box\">
<h2>";
// line 15
echo twig_escape_filter($this->env, (($this->sandbox->ensureToStringAllowed((isset($context["FirstName"]) || array_key_exists("FirstName", $context) ? $context["FirstName"] : (function () { throw new RuntimeError('Variable "FirstName" does not exist.', 15, $this->source); })()), 15, $this->source) . " ") . $this->sandbox->ensureToStringAllowed((isset($context["LastName"]) || array_key_exists("LastName", $context) ? $context["LastName"] : (function () { throw new RuntimeError('Variable "LastName" does not exist.', 15, $this->source); })()), 15, $this->source)), "html", null, true);
echo "</h2>
<h2><a href=\"/";
// line 16
echo twig_escape_filter($this->env, twig_lower_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["language"]) || array_key_exists("language", $context) ? $context["language"] : (function () { throw new RuntimeError('Variable "language" does not exist.', 16, $this->source); })()), 16, $this->source)), "html", null, true);
echo "/account/history\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.downloadhistory"), "html", null, true);
echo "</a></h2>
<h2><a href=\"/";
// line 17
echo twig_escape_filter($this->env, twig_lower_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["language"]) || array_key_exists("language", $context) ? $context["language"] : (function () { throw new RuntimeError('Variable "language" does not exist.', 17, $this->source); })()), 17, $this->source)), "html", null, true);
echo "/account/sign-out\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.signout"), "html", null, true);
echo "</a></h2>
</div>
</div>
</div>
";
}
// line 22
echo "
";
// line 23
$context["checkouturl"] = null;
// line 24
echo " ";
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 24, $this->source); })())) {
// line 25
echo " ";
$context["checkouturl"] = $this->env->getFunction('pimcore_url')->getCallable()(["action" => "list", "prefix" => twig_lower_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["language"]) || array_key_exists("language", $context) ? $context["language"] : (function () { throw new RuntimeError('Variable "language" does not exist.', 25, $this->source); })()), 25, $this->source)), "cart" => null]);
// line 26
echo "
";
}
// line 28
echo "
<div class=\"download-info hover-js\">
";
// line 30
if (((isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 30, $this->source); })()) && (twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 30, $this->source); })()), "getItems", [], "method", false, false, true, 30)) > 0))) {
// line 31
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["checkouturl"]) || array_key_exists("checkouturl", $context) ? $context["checkouturl"] : (function () { throw new RuntimeError('Variable "checkouturl" does not exist.', 31, $this->source); })()), 31, $this->source), "html", null, true);
echo "\"><div class=\"data-holder\"><span>";
echo twig_escape_filter($this->env, twig_length_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 31, $this->source); })()), "getItems", [], "method", false, false, true, 31), 31, $this->source)), "html", null, true);
echo "</span></div></a>
";
}
// line 33
echo " <div class=\"text\">
<span class=\"title\"><a href=\"";
// line 34
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["checkouturl"]) || array_key_exists("checkouturl", $context) ? $context["checkouturl"] : (function () { throw new RuntimeError('Variable "checkouturl" does not exist.', 34, $this->source); })()), 34, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.files to"), "html", null, true);
echo "</a></span>
<strong class=\"link\"><a href=\"";
// line 35
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["checkouturl"]) || array_key_exists("checkouturl", $context) ? $context["checkouturl"] : (function () { throw new RuntimeError('Variable "checkouturl" does not exist.', 35, $this->source); })()), 35, $this->source), "html", null, true);
echo "\" class=\"download\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.download"), "html", null, true);
echo "</a></strong>
</div>
<div class=\"drop\">
<div class=\"box\">
";
// line 39
if (((isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 39, $this->source); })()) && (twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 39, $this->source); })()), "getItems", [], "method", false, false, true, 39)) > 0))) {
// line 40
echo " <h2>";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.downloadlist"), "html", null, true);
echo ":</h2>
<ul>
";
// line 42
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["cart"]) || array_key_exists("cart", $context) ? $context["cart"] : (function () { throw new RuntimeError('Variable "cart" does not exist.', 42, $this->source); })()), "getItems", [], "method", false, false, true, 42));
foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
// line 43
echo " <li><a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "product", [], "any", false, false, true, 43), "detailUrl", [], "any", false, false, true, 43), 43, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["item"], "product", [], "any", false, false, true, 43), "OSName", [], "any", false, false, true, 43), 43, $this->source), "html", null, true);
echo "</a></li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 45
echo " </ul>
<a href=\"";
// line 46
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["checkouturl"]) || array_key_exists("checkouturl", $context) ? $context["checkouturl"] : (function () { throw new RuntimeError('Variable "checkouturl" does not exist.', 46, $this->source); })()), 46, $this->source), "html", null, true);
echo "\" class=\"btn btn-default\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.proceed to download"), "html", null, true);
echo "</a>
<?php else: ?>
<h2>";
// line 48
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.add to the download list"), "html", null, true);
echo "</h2>
";
}
// line 50
echo " </div>
</div>
</div>
</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Cart/topNavCart.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 179 => 50, 174 => 48, 167 => 46, 164 => 45, 153 => 43, 149 => 42, 143 => 40, 141 => 39, 132 => 35, 126 => 34, 123 => 33, 115 => 31, 113 => 30, 109 => 28, 105 => 26, 102 => 25, 99 => 24, 97 => 23, 94 => 22, 84 => 17, 78 => 16, 74 => 15, 67 => 11, 63 => 10, 57 => 7, 52 => 4, 50 => 3, 47 => 2, 45 => 1,);
}
public function getSourceContext()
{
return new Source("{% set isPortal = ((isPortal is defined) and isPortal) %}
<div class=\"tools\">
{% if FirstName is defined and FirstName is not empty %}
<div class=\"account-info\">
<div class=\"img-holder\">
<a href=\"#\"><img src=\"{{ asset('website/static/images/profile-icon.png') }}\" alt=\"\" width=\"37\" height=\"37\"></a>
</div>
<div class=\"text\">
<span class=\"greeting\">{{ 'topnav.welcome'|trans }},</span>
<strong class=\"name\"><a href=\"#\">{{ FirstName }}</a></strong>
</div>
<div class=\"drop\">
<div class=\"box\">
<h2>{{ FirstName ~ ' ' ~ LastName }}</h2>
<h2><a href=\"/{{ language|lower }}/account/history\">{{ 'topnav.downloadhistory'|trans}}</a></h2>
<h2><a href=\"/{{ language|lower }}/account/sign-out\">{{ 'topnav.signout'|trans}}</a></h2>
</div>
</div>
</div>
{% endif %}
{% set checkouturl = null %}
{% if editmode %}
{% set checkouturl = pimcore_url({'action': 'list', 'prefix': language|lower, 'cart': null}) %}
{% endif %}
<div class=\"download-info hover-js\">
{% if cart and cart.getItems()|length > 0 %}
<a href=\"{{ checkouturl }}\"><div class=\"data-holder\"><span>{{cart.getItems()|length}}</span></div></a>
{% endif %}
<div class=\"text\">
<span class=\"title\"><a href=\"{{ checkouturl }}\">{{ 'topnav.files to'|trans}}</a></span>
<strong class=\"link\"><a href=\"{{ checkouturl }}\" class=\"download\">{{ 'topnav.download'|trans}}</a></strong>
</div>
<div class=\"drop\">
<div class=\"box\">
{% if cart and cart.getItems()|length > 0 %}
<h2>{{ 'cart.downloadlist'|trans}}:</h2>
<ul>
{% for item in cart.getItems() %}
<li><a href=\"{{ item.product.detailUrl }}\">{{ item.product.OSName }}</a></li>
{% endfor %}
</ul>
<a href=\"{{ checkouturl }}\" class=\"btn btn-default\">{{ 'topnav.proceed to download'|trans}}</a>
<?php else: ?>
<h2>{{ 'topnav.add to the download list'|trans}}</h2>
{% endif %}
</div>
</div>
</div>
</div>
", "Cart/topNavCart.html.twig", "/var/www/vhosts/centricdxb.com/pim2.centricdxb.com/templates/Cart/topNavCart.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 1, "if" => 3, "for" => 42);
static $filters = array("escape" => 7, "trans" => 10, "lower" => 16, "length" => 30);
static $functions = array("asset" => 7, "pimcore_url" => 25);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['escape', 'trans', 'lower', 'length'],
['asset', 'pimcore_url']
);
} 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;
}
}
}