var/cache/dev/twig/66/66dbc8c6204682db0a082b376c51744c.php line 47

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. /* Block/header.twig */
  14. class __TwigTemplate_1c95d03480c58ccd9e805b46ea32cc41 extends \Eccube\Twig\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""Block/header.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""Block/header.twig"));
  35.         // line 1
  36.         $context["totalQuantity"] = $this->extensions['Eccube\Twig\Extension\CartServiceExtension']->get_carts_total_quantity();
  37.         // line 2
  38.         $context["Categories"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "getList", [], "method"falsefalsetrue2);
  39.         // line 3
  40.         echo "<header id=\"header\">
  41.     <h1>
  42.       <a href=\"";
  43.         // line 5
  44.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
  45.         echo "\"><img src=\"";
  46.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/common/logo.svg"), "html"nulltrue);
  47.         echo "\" alt=\"U-ARTS\" class=\"logo\"></a>
  48.     </h1>
  49.     <p class=\"header_sub_txt\">オーダーメイド鏡販売のユーアーツ</p>
  50.     <ul class=\"gnav\">
  51.         <li class=\"haschild\">
  52.             <a href=\"";
  53.         // line 11
  54.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  55.         echo "\">取扱い商品</a>
  56.             <div class=\"megamenu\">
  57.                 ";
  58.         // line 13
  59.         $context['_parent'] = $context;
  60.         $context['_seq'] = twig_ensure_traversable((isset($context["Categories"]) || array_key_exists("Categories"$context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.'13$this->source); })()));
  61.         foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  62.             // line 14
  63.             echo "                <ul>
  64.                     <li>
  65.                         <a href=\"";
  66.             // line 16
  67.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  68.             echo "?category_id=";
  69.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Category"], "id", [], "any"falsefalsetrue16), 16$this->source), "html"nulltrue);
  70.             echo "\">
  71.                             ";
  72.             // line 17
  73.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Category"], "name", [], "any"falsefalsetrue17), 17$this->source), "html"nulltrue);
  74.             echo "<span>(";
  75.             echo twig_escape_filter($this->envtwig_length_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Category"], "ProductCategories", [], "any"falsefalsetrue17), 17$this->source)), "html"nulltrue);
  76.             echo ")</span>
  77.                         </a>
  78.                     </li>
  79.                     ";
  80.             // line 20
  81.             if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source$context["Category"], "children", [], "any"falsefalsetrue20)) > 0)) {
  82.                 // line 21
  83.                 echo "                    ";
  84.                 $context['_parent'] = $context;
  85.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Category"], "children", [], "any"falsefalsetrue21));
  86.                 foreach ($context['_seq'] as $context["_key"] => $context["ChildCategory"]) {
  87.                     // line 22
  88.                     echo "                    <li>
  89.                         <a href=\"";
  90.                     // line 23
  91.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  92.                     echo "?category_id=";
  93.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["ChildCategory"], "id", [], "any"falsefalsetrue23), 23$this->source), "html"nulltrue);
  94.                     echo "\">";
  95.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["ChildCategory"], "name", [], "any"falsefalsetrue23), 23$this->source), "html"nulltrue);
  96.                     echo "<span>(";
  97.                     echo twig_escape_filter($this->envtwig_length_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["ChildCategory"], "ProductCategories", [], "any"falsefalsetrue23), 23$this->source)), "html"nulltrue);
  98.                     echo ")</span></a>
  99.                     </li>
  100.                     ";
  101.                 }
  102.                 $_parent $context['_parent'];
  103.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ChildCategory'], $context['_parent'], $context['loop']);
  104.                 $context array_intersect_key($context$_parent) + $_parent;
  105.                 // line 26
  106.                 echo "                    ";
  107.             }
  108.             // line 27
  109.             echo "                </ul>
  110.                 ";
  111.         }
  112.         $_parent $context['_parent'];
  113.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  114.         $context array_intersect_key($context$_parent) + $_parent;
  115.         // line 29
  116.         echo "            </div>
  117.         </li>
  118.         <li><a href=\"";
  119.         // line 31
  120.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("user_data", ["route" => "order_mirror"]);
  121.         echo "\">オーダーメイド鏡とは</a></li>
  122.         <li><a href=\"";
  123.         // line 32
  124.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("user_data", ["route" => "setting"]);
  125.         echo "\">鏡の取り付け方</a></li>
  126.         <li><a href=\"";
  127.         // line 33
  128.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("user_data", ["route" => "faq"]);
  129.         echo "\">Q&A</a></li>
  130.         <li><a href=\"";
  131.         // line 34
  132.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("help_about");
  133.         echo "\">ユーアーツについて</a></li>
  134.         <li class=\"icon mail\">
  135.             <a href=\"";
  136.         // line 36
  137.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("contact");
  138.         echo "\">
  139.                 <img src=\"";
  140.         // line 37
  141.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/mail.svg"), "html"nulltrue);
  142.         echo "\" alt=\"メールアイコン\">
  143.             </a>
  144.         </li>
  145.         <li class=\"icon cart\">
  146.             <a href=\"";
  147.         // line 41
  148.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  149.         echo "\">
  150.                 <img src=\"";
  151.         // line 42
  152.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/cart.svg"), "html"nulltrue);
  153.         echo "\" alt=\"カートアイコン\">
  154.                 <span class=\"ec-cartNavi__badge\">";
  155.         // line 43
  156.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["totalQuantity"]) || array_key_exists("totalQuantity"$context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.'43$this->source); })()), 43$this->source), "html"nulltrue);
  157.         echo "</span>
  158.             </a>
  159.         </li>
  160.     </ul>
  161. </header>
  162. <ul class=\"sp_menu\">
  163.     <li id=\"nav_toggle\">
  164.       <div>
  165.         <span class=\"border\"></span>
  166.         <span class=\"border\"></span>
  167.         <span class=\"border\"></span>
  168.       </div>
  169.       <span class=\"txt\">Menu</span>
  170.     </li>
  171.     ";
  172.         // line 58
  173.         if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_USER")) {
  174.             // line 59
  175.             echo "    <li><a href=\"";
  176.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("logout");
  177.             echo "\">
  178.         <img src=\"";
  179.             // line 60
  180.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/login.svg"), "html"nulltrue);
  181.             echo "\" alt=\"Logoutアイコン\">
  182.         <span>Logout</span>
  183.       </a>
  184.     </li>
  185.     ";
  186.         } else {
  187.             // line 65
  188.             echo "    <li>
  189.         <a href=\"";
  190.             // line 66
  191.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("mypage_login");
  192.             echo "\">
  193.         <img src=\"";
  194.             // line 67
  195.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/login.svg"), "html"nulltrue);
  196.             echo "\" alt=\"Loginアイコン\">
  197.         <span>Login</span>
  198.       </a>
  199.     </li>
  200.     ";
  201.         }
  202.         // line 72
  203.         echo "    <li><a href=\"";
  204.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("mypage");
  205.         echo "\">
  206.         <img src=\"";
  207.         // line 73
  208.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/mypage.svg"), "html"nulltrue);
  209.         echo "\" alt=\"My pageアイコン\">
  210.         <span>My page</span>
  211.       </a>
  212.     </li>
  213.    
  214.     <li><a href=\"";
  215.         // line 78
  216.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("contact");
  217.         echo "\">
  218.         <img src=\"";
  219.         // line 79
  220.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/mail.svg"), "html"nulltrue);
  221.         echo "\" alt=\"Contactアイコン\">
  222.         <span>Contact</span>
  223.       </a>
  224.     </li>
  225.     <li><a href=\"";
  226.         // line 83
  227.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("cart");
  228.         echo "\">
  229.         <span class=\"ec-cartNavi__badge\">";
  230.         // line 84
  231.         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed((isset($context["totalQuantity"]) || array_key_exists("totalQuantity"$context) ? $context["totalQuantity"] : (function () { throw new RuntimeError('Variable "totalQuantity" does not exist.'84$this->source); })()), 84$this->source), "html"nulltrue);
  232.         echo "</span>
  233.         <img src=\"";
  234.         // line 85
  235.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/cart.svg"), "html"nulltrue);
  236.         echo "\" alt=\"Cartアイコン\">
  237.         <span>Cart</span>
  238.       </a>
  239.     </li>
  240.   </ul>
  241. ";
  242.         
  243.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  244.         
  245.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  246.     }
  247.     public function getTemplateName()
  248.     {
  249.         return "Block/header.twig";
  250.     }
  251.     public function isTraitable()
  252.     {
  253.         return false;
  254.     }
  255.     public function getDebugInfo()
  256.     {
  257.         return array (  246 => 85,  242 => 84,  238 => 83,  231 => 79,  227 => 78,  219 => 73,  214 => 72,  206 => 67,  202 => 66,  199 => 65,  191 => 60,  186 => 59,  184 => 58,  166 => 43,  162 => 42,  158 => 41,  151 => 37,  147 => 36,  142 => 34,  138 => 33,  134 => 32,  130 => 31,  126 => 29,  119 => 27,  116 => 26,  101 => 23,  98 => 22,  93 => 21,  91 => 20,  83 => 17,  77 => 16,  73 => 14,  69 => 13,  64 => 11,  53 => 5,  49 => 3,  47 => 2,  45 => 1,);
  258.     }
  259.     public function getSourceContext()
  260.     {
  261.         return new Source("{% set totalQuantity = get_carts_total_quantity() %}
  262. {% set Categories = repository('Eccube\\\\Entity\\\\Category').getList() %}
  263. <header id=\"header\">
  264.     <h1>
  265.       <a href=\"{{ url('homepage') }}\"><img src=\"{{ asset('assets/img/common/logo.svg') }}\" alt=\"U-ARTS\" class=\"logo\"></a>
  266.     </h1>
  267.     <p class=\"header_sub_txt\">オーダーメイド鏡販売のユーアーツ</p>
  268.     <ul class=\"gnav\">
  269.         <li class=\"haschild\">
  270.             <a href=\"{{ url('product_list') }}\">取扱い商品</a>
  271.             <div class=\"megamenu\">
  272.                 {% for Category in Categories %}
  273.                 <ul>
  274.                     <li>
  275.                         <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">
  276.                             {{ Category.name }}<span>({{ Category.ProductCategories|length}})</span>
  277.                         </a>
  278.                     </li>
  279.                     {% if Category.children|length > 0 %}
  280.                     {% for ChildCategory in Category.children %}
  281.                     <li>
  282.                         <a href=\"{{ url('product_list') }}?category_id={{ ChildCategory.id }}\">{{ ChildCategory.name }}<span>({{ ChildCategory.ProductCategories|length}})</span></a>
  283.                     </li>
  284.                     {% endfor %}
  285.                     {% endif %}
  286.                 </ul>
  287.                 {% endfor %}
  288.             </div>
  289.         </li>
  290.         <li><a href=\"{{ url('user_data', {'route': 'order_mirror'}) }}\">オーダーメイド鏡とは</a></li>
  291.         <li><a href=\"{{ url('user_data', {'route': 'setting'}) }}\">鏡の取り付け方</a></li>
  292.         <li><a href=\"{{ url('user_data', {'route': 'faq'}) }}\">Q&A</a></li>
  293.         <li><a href=\"{{ url('help_about') }}\">ユーアーツについて</a></li>
  294.         <li class=\"icon mail\">
  295.             <a href=\"{{ url('contact') }}\">
  296.                 <img src=\"{{ asset('assets/img/icon/mail.svg') }}\" alt=\"メールアイコン\">
  297.             </a>
  298.         </li>
  299.         <li class=\"icon cart\">
  300.             <a href=\"{{ url('cart') }}\">
  301.                 <img src=\"{{ asset('assets/img/icon/cart.svg') }}\" alt=\"カートアイコン\">
  302.                 <span class=\"ec-cartNavi__badge\">{{totalQuantity}}</span>
  303.             </a>
  304.         </li>
  305.     </ul>
  306. </header>
  307. <ul class=\"sp_menu\">
  308.     <li id=\"nav_toggle\">
  309.       <div>
  310.         <span class=\"border\"></span>
  311.         <span class=\"border\"></span>
  312.         <span class=\"border\"></span>
  313.       </div>
  314.       <span class=\"txt\">Menu</span>
  315.     </li>
  316.     {% if is_granted('ROLE_USER') %}
  317.     <li><a href=\"{{ url('logout') }}\">
  318.         <img src=\"{{ asset('assets/img/icon/login.svg') }}\" alt=\"Logoutアイコン\">
  319.         <span>Logout</span>
  320.       </a>
  321.     </li>
  322.     {% else %}
  323.     <li>
  324.         <a href=\"{{ url('mypage_login') }}\">
  325.         <img src=\"{{ asset('assets/img/icon/login.svg') }}\" alt=\"Loginアイコン\">
  326.         <span>Login</span>
  327.       </a>
  328.     </li>
  329.     {% endif %}
  330.     <li><a href=\"{{ url('mypage') }}\">
  331.         <img src=\"{{ asset('assets/img/icon/mypage.svg') }}\" alt=\"My pageアイコン\">
  332.         <span>My page</span>
  333.       </a>
  334.     </li>
  335.    
  336.     <li><a href=\"{{ url('contact') }}\">
  337.         <img src=\"{{ asset('assets/img/icon/mail.svg') }}\" alt=\"Contactアイコン\">
  338.         <span>Contact</span>
  339.       </a>
  340.     </li>
  341.     <li><a href=\"{{ url('cart') }}\">
  342.         <span class=\"ec-cartNavi__badge\">{{totalQuantity}}</span>
  343.         <img src=\"{{ asset('assets/img/icon/cart.svg') }}\" alt=\"Cartアイコン\">
  344.         <span>Cart</span>
  345.       </a>
  346.     </li>
  347.   </ul>
  348. ""Block/header.twig""/home/hr67ekh16/u-arts-mirror.jp/public_html/app/template/uarts/Block/header.twig");
  349.     }
  350.     
  351.     public function checkSecurity()
  352.     {
  353.         static $tags = array("set" => 1"for" => 13"if" => 20);
  354.         static $filters = array("escape" => 5"length" => 17);
  355.         static $functions = array("get_carts_total_quantity" => 1"repository" => 2"url" => 5"asset" => 5"is_granted" => 58);
  356.         try {
  357.             $this->sandbox->checkSecurity(
  358.                 ['set''for''if'],
  359.                 ['escape''length'],
  360.                 ['get_carts_total_quantity''repository''url''asset''is_granted']
  361.             );
  362.         } catch (SecurityError $e) {
  363.             $e->setSourceContext($this->source);
  364.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  365.                 $e->setTemplateLine($tags[$e->getTagName()]);
  366.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  367.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  368.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  369.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  370.             }
  371.             throw $e;
  372.         }
  373.     }
  374. }