var/cache/dev/twig/21/21d305b8d10a7dd44f04f4aedc3ca67e.php line 154

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. /* Cart/topNavCart.html.twig */
  14. class __TwigTemplate_c3b417b808c0ad54d031dbc1d195e3a7 extends 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.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Cart/topNavCart.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Cart/topNavCart.html.twig"));
  35.         // line 1
  36.         $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); })()));
  37.         // line 2
  38.         echo "<div class=\"tools\">
  39.   ";
  40.         // line 3
  41.         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); })())))) {
  42.             // line 4
  43.             echo "  <div class=\"account-info\">
  44.     <div class=\"img-holder\">
  45.     
  46.       <a href=\"#\"><img src=\"";
  47.             // line 7
  48.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("website/static/images/profile-icon.png"), "html"nulltrue);
  49.             echo "\" alt=\"\" width=\"37\" height=\"37\"></a>
  50.     </div>
  51.     <div class=\"text\">
  52.       <span class=\"greeting\">";
  53.             // line 10
  54.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.welcome"), "html"nulltrue);
  55.             echo ",</span>
  56.       <strong class=\"name\"><a href=\"#\">";
  57.             // line 11
  58.             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"nulltrue);
  59.             echo "</a></strong>
  60.     </div>
  61.     <div class=\"drop\">
  62.       <div class=\"box\">
  63.         <h2>";
  64.             // line 15
  65.             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"nulltrue);
  66.             echo "</h2>
  67.         <h2><a href=\"/";
  68.             // line 16
  69.             echo twig_escape_filter($this->envtwig_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"nulltrue);
  70.             echo "/account/history\">";
  71.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.downloadhistory"), "html"nulltrue);
  72.             echo "</a></h2>
  73.         <h2><a href=\"/";
  74.             // line 17
  75.             echo twig_escape_filter($this->envtwig_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"nulltrue);
  76.             echo "/account/sign-out\">";
  77.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.signout"), "html"nulltrue);
  78.             echo "</a></h2>
  79.       </div>
  80.     </div>
  81.   </div>
  82.   ";
  83.         }
  84.         // line 22
  85.         echo "
  86.   ";
  87.         // line 23
  88.         $context["checkouturl"] = null;
  89.         // line 24
  90.         echo "  ";
  91.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'24$this->source); })())) {
  92.             // line 25
  93.             echo "    ";
  94.             $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]);
  95.             // line 26
  96.             echo "   
  97.   ";
  98.         }
  99.         // line 28
  100.         echo "  
  101.   <div class=\"download-info hover-js\">
  102. ";
  103.         // line 30
  104.         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->envtwig_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"falsefalsetrue30)) > 0))) {
  105.             // line 31
  106.             echo "    <a href=\"";
  107.             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"nulltrue);
  108.             echo "\"><div class=\"data-holder\"><span>";
  109.             echo twig_escape_filter($this->envtwig_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"falsefalsetrue31), 31$this->source)), "html"nulltrue);
  110.             echo "</span></div></a>
  111.     ";
  112.         }
  113.         // line 33
  114.         echo "    <div class=\"text\">
  115.       <span class=\"title\"><a href=\"";
  116.         // line 34
  117.         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"nulltrue);
  118.         echo "\">";
  119.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.files to"), "html"nulltrue);
  120.         echo "</a></span>
  121.       <strong class=\"link\"><a href=\"";
  122.         // line 35
  123.         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"nulltrue);
  124.         echo "\" class=\"download\">";
  125.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.download"), "html"nulltrue);
  126.         echo "</a></strong>
  127.     </div>
  128.     <div class=\"drop\">
  129.       <div class=\"box\">
  130.         ";
  131.         // line 39
  132.         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->envtwig_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"falsefalsetrue39)) > 0))) {
  133.             // line 40
  134.             echo "        <h2>";
  135.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("cart.downloadlist"), "html"nulltrue);
  136.             echo ":</h2>
  137.         <ul>
  138.           ";
  139.             // line 42
  140.             $context['_parent'] = $context;
  141.             $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"falsefalsetrue42));
  142.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  143.                 // line 43
  144.                 echo "            <li><a href=\"";
  145.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "product", [], "any"falsefalsetrue43), "detailUrl", [], "any"falsefalsetrue43), 43$this->source), "html"nulltrue);
  146.                 echo "\">";
  147.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["item"], "product", [], "any"falsefalsetrue43), "OSName", [], "any"falsefalsetrue43), 43$this->source), "html"nulltrue);
  148.                 echo "</a></li>
  149.           ";
  150.             }
  151.             $_parent $context['_parent'];
  152.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  153.             $context array_intersect_key($context$_parent) + $_parent;
  154.             // line 45
  155.             echo "        </ul>
  156.         <a href=\"";
  157.             // line 46
  158.             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"nulltrue);
  159.             echo "\" class=\"btn btn-default\">";
  160.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.proceed to download"), "html"nulltrue);
  161.             echo "</a>
  162.         <?php else: ?>
  163.         <h2>";
  164.             // line 48
  165.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("topnav.add to the download list"), "html"nulltrue);
  166.             echo "</h2>
  167.         ";
  168.         }
  169.         // line 50
  170.         echo "      </div>
  171.     </div>
  172.   </div>
  173.   
  174. </div>
  175. ";
  176.         
  177.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  178.         
  179.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  180.     }
  181.     /**
  182.      * @codeCoverageIgnore
  183.      */
  184.     public function getTemplateName()
  185.     {
  186.         return "Cart/topNavCart.html.twig";
  187.     }
  188.     /**
  189.      * @codeCoverageIgnore
  190.      */
  191.     public function isTraitable()
  192.     {
  193.         return false;
  194.     }
  195.     /**
  196.      * @codeCoverageIgnore
  197.      */
  198.     public function getDebugInfo()
  199.     {
  200.         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,);
  201.     }
  202.     public function getSourceContext()
  203.     {
  204.         return new Source("{% set isPortal = ((isPortal is defined) and isPortal) %}
  205. <div class=\"tools\">
  206.   {% if FirstName is defined and FirstName is not empty %}
  207.   <div class=\"account-info\">
  208.     <div class=\"img-holder\">
  209.     
  210.       <a href=\"#\"><img src=\"{{ asset('website/static/images/profile-icon.png') }}\" alt=\"\" width=\"37\" height=\"37\"></a>
  211.     </div>
  212.     <div class=\"text\">
  213.       <span class=\"greeting\">{{ 'topnav.welcome'|trans }},</span>
  214.       <strong class=\"name\"><a href=\"#\">{{ FirstName }}</a></strong>
  215.     </div>
  216.     <div class=\"drop\">
  217.       <div class=\"box\">
  218.         <h2>{{ FirstName ~ ' ' ~ LastName }}</h2>
  219.         <h2><a href=\"/{{ language|lower }}/account/history\">{{ 'topnav.downloadhistory'|trans}}</a></h2>
  220.         <h2><a href=\"/{{ language|lower }}/account/sign-out\">{{ 'topnav.signout'|trans}}</a></h2>
  221.       </div>
  222.     </div>
  223.   </div>
  224.   {% endif %}
  225.   {% set checkouturl = null %}
  226.   {% if editmode %}
  227.     {% set checkouturl =  pimcore_url({'action': 'list', 'prefix': language|lower, 'cart': null}) %}
  228.    
  229.   {% endif %}
  230.   
  231.   <div class=\"download-info hover-js\">
  232. {% if cart and cart.getItems()|length > 0 %}
  233.     <a href=\"{{ checkouturl }}\"><div class=\"data-holder\"><span>{{cart.getItems()|length}}</span></div></a>
  234.     {% endif %}
  235.     <div class=\"text\">
  236.       <span class=\"title\"><a href=\"{{ checkouturl }}\">{{ 'topnav.files to'|trans}}</a></span>
  237.       <strong class=\"link\"><a href=\"{{ checkouturl }}\" class=\"download\">{{ 'topnav.download'|trans}}</a></strong>
  238.     </div>
  239.     <div class=\"drop\">
  240.       <div class=\"box\">
  241.         {% if cart and cart.getItems()|length > 0 %}
  242.         <h2>{{ 'cart.downloadlist'|trans}}:</h2>
  243.         <ul>
  244.           {% for item in cart.getItems() %}
  245.             <li><a href=\"{{ item.product.detailUrl }}\">{{ item.product.OSName }}</a></li>
  246.           {% endfor %}
  247.         </ul>
  248.         <a href=\"{{ checkouturl }}\" class=\"btn btn-default\">{{ 'topnav.proceed to download'|trans}}</a>
  249.         <?php else: ?>
  250.         <h2>{{ 'topnav.add to the download list'|trans}}</h2>
  251.         {% endif %}
  252.       </div>
  253.     </div>
  254.   </div>
  255.   
  256. </div>
  257. ""Cart/topNavCart.html.twig""/var/www/vhosts/centricdxb.com/pim2.centricdxb.com/templates/Cart/topNavCart.html.twig");
  258.     }
  259.     
  260.     public function checkSecurity()
  261.     {
  262.         static $tags = array("set" => 1"if" => 3"for" => 42);
  263.         static $filters = array("escape" => 7"trans" => 10"lower" => 16"length" => 30);
  264.         static $functions = array("asset" => 7"pimcore_url" => 25);
  265.         try {
  266.             $this->sandbox->checkSecurity(
  267.                 ['set''if''for'],
  268.                 ['escape''trans''lower''length'],
  269.                 ['asset''pimcore_url']
  270.             );
  271.         } catch (SecurityError $e) {
  272.             $e->setSourceContext($this->source);
  273.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  274.                 $e->setTemplateLine($tags[$e->getTagName()]);
  275.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  276.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  277.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  278.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  279.             }
  280.             throw $e;
  281.         }
  282.     }
  283. }