var/cache/dev/twig/22/2274f17bae2cbe7116f9f2cd46fe201c.php line 71

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_88bf0d28e854925cf563f9d83e8ee6de 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.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/header.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/header.twig"));
  33.         // line 11
  34.         echo "
  35. <div>
  36. \t<div class=\"header-bar bg-blue\">
  37. \t\t<p class=\"d-none d-md-block\">電機工事に安心して使える厳選した電材をお値打ちな価格でネット通販|電材Blue Wood</p>
  38. \t</div>
  39. \t<nav class=\"header-navi container\">
  40. \t\t<div class=\"d-flex justify-content-between align-items-center w-100\">
  41. \t\t\t<div>
  42. \t\t\t\t<div class=\"d-flex align-items-center\">
  43. \t\t\t\t\t";
  44.         // line 21
  45.         echo "\t   \t\t\t\t";
  46.         echo twig_include($this->env$context"Block/nav_sp.twig");
  47.         echo "
  48. \t\t\t\t\t<div class=\"logo-wrapper\">
  49. \t\t\t\t\t\t<a href=\"";
  50.         // line 23
  51.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
  52.         echo "\" aria-label=\"電材Blue Wood トップページへ移動します\">
  53. \t\t\t\t\t\t\t<img src=\"";
  54.         // line 24
  55.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/logo.svg""user_data"), "html"nulltrue);
  56.         echo "\" alt=\"電材Blue Wood\" class=\"logo\"/>
  57. \t\t\t\t\t\t</a>
  58. \t\t\t\t\t</div>
  59. \t\t\t\t\t<div class=\"d-none d-md-block\">
  60. \t\t\t\t\t\t";
  61.         // line 28
  62.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
  63.         echo "
  64. \t\t\t\t\t</div>
  65. \t\t\t\t</div>
  66. \t\t\t</div>
  67. \t\t\t<div>
  68. \t\t\t\t<div class=\"hedaer-trailing\">
  69. \t\t\t\t\t";
  70.         // line 34
  71.         echo twig_include($this->env$context"Block/login.twig");
  72.         echo "
  73. \t\t\t\t\t";
  74.         // line 35
  75.         echo twig_include($this->env$context"Block/cart.twig");
  76.         echo "
  77. \t\t\t\t</div>
  78. \t\t\t</div>
  79. \t\t</div>
  80. \t</nav>
  81. \t";
  82.         // line 42
  83.         echo "\t<div class=\"d-md-none mt-6 xs-gutter\">
  84. \t\t";
  85.         // line 43
  86.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
  87.         echo "
  88. \t</div>
  89. \t";
  90.         // line 47
  91.         echo "\t";
  92.         $context["request_uri"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'47$this->source); })()), "request", [], "any"falsefalsefalse47), "server", [], "any"falsefalsefalse47), "get", [=> "REQUEST_URI"], "method"falsefalsefalse47);
  93.         // line 48
  94.         echo "\t";
  95.         if (((isset($context["request_uri"]) || array_key_exists("request_uri"$context) ? $context["request_uri"] : (function () { throw new RuntimeError('Variable "request_uri" does not exist.'48$this->source); })()) == "/")) {
  96.             // line 49
  97.             echo "\t";
  98.             $context["NewsList"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\News"), "getList", [], "method"falsefalsefalse49);
  99.             // line 50
  100.             echo "\t<div class=\"mt-4 mt-md-0 xs-gutter\">
  101. \t\t<div id=\"header-news\" class=\"header-news\">
  102. \t\t\t";
  103.             // line 52
  104.             $context['_parent'] = $context;
  105.             $context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList"$context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.'52$this->source); })()));
  106.             $context['loop'] = [
  107.               'parent' => $context['_parent'],
  108.               'index0' => 0,
  109.               'index'  => 1,
  110.               'first'  => true,
  111.             ];
  112.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  113.                 $length count($context['_seq']);
  114.                 $context['loop']['revindex0'] = $length 1;
  115.                 $context['loop']['revindex'] = $length;
  116.                 $context['loop']['length'] = $length;
  117.                 $context['loop']['last'] = === $length;
  118.             }
  119.             foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
  120.                 // line 53
  121.                 echo "\t\t\t\t";
  122.                 if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse53) == 1)) {
  123.                     // line 54
  124.                     echo "            \t<a href=";
  125.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("news_detail", ["id" => twig_get_attribute($this->env$this->source$context["News"], "id", [], "any"falsefalsefalse54)]), "html"nulltrue);
  126.                     echo " class=\"header-news__text\">
  127. \t\t\t\t\t";
  128.                     // line 55
  129.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["News"], "title", [], "any"falsefalsefalse55), "html"nulltrue);
  130.                     echo "
  131. \t\t\t\t</a>
  132. \t\t\t\t";
  133.                 }
  134.                 // line 58
  135.                 echo "\t\t\t";
  136.                 ++$context['loop']['index0'];
  137.                 ++$context['loop']['index'];
  138.                 $context['loop']['first'] = false;
  139.                 if (isset($context['loop']['length'])) {
  140.                     --$context['loop']['revindex0'];
  141.                     --$context['loop']['revindex'];
  142.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  143.                 }
  144.             }
  145.             $_parent $context['_parent'];
  146.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
  147.             $context array_intersect_key($context$_parent) + $_parent;
  148.             // line 59
  149.             echo "\t\t</div>
  150. \t</div>
  151. \t";
  152.         }
  153.         // line 62
  154.         echo "
  155. <div>
  156. ";
  157.         
  158.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  159.         
  160.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  161.     }
  162.     public function getTemplateName()
  163.     {
  164.         return "Block/header.twig";
  165.     }
  166.     public function isTraitable()
  167.     {
  168.         return false;
  169.     }
  170.     public function getDebugInfo()
  171.     {
  172.         return array (  165 => 62,  160 => 59,  146 => 58,  140 => 55,  135 => 54,  132 => 53,  115 => 52,  111 => 50,  108 => 49,  105 => 48,  102 => 47,  96 => 43,  93 => 42,  84 => 35,  80 => 34,  71 => 28,  64 => 24,  60 => 23,  54 => 21,  43 => 11,);
  173.     }
  174.     public function getSourceContext()
  175.     {
  176.         return new Source("{#
  177. This file is part of EC-CUBE
  178. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  179. http://www.ec-cube.co.jp/
  180. For the full copyright and license information, please view the LICENSE
  181. file that was distributed with this source code.
  182. #}
  183. <div>
  184. \t<div class=\"header-bar bg-blue\">
  185. \t\t<p class=\"d-none d-md-block\">電機工事に安心して使える厳選した電材をお値打ちな価格でネット通販|電材Blue Wood</p>
  186. \t</div>
  187. \t<nav class=\"header-navi container\">
  188. \t\t<div class=\"d-flex justify-content-between align-items-center w-100\">
  189. \t\t\t<div>
  190. \t\t\t\t<div class=\"d-flex align-items-center\">
  191. \t\t\t\t\t{# ハンバーガー #}
  192. \t   \t\t\t\t{{ include('Block/nav_sp.twig') }}
  193. \t\t\t\t\t<div class=\"logo-wrapper\">
  194. \t\t\t\t\t\t<a href=\"{{ url('homepage') }}\" aria-label=\"電材Blue Wood トップページへ移動します\">
  195. \t\t\t\t\t\t\t<img src=\"{{ asset('assets/img/logo.svg','user_data') }}\" alt=\"電材Blue Wood\" class=\"logo\"/>
  196. \t\t\t\t\t\t</a>
  197. \t\t\t\t\t</div>
  198. \t\t\t\t\t<div class=\"d-none d-md-block\">
  199. \t\t\t\t\t\t{{ render(path('block_search_product')) }}
  200. \t\t\t\t\t</div>
  201. \t\t\t\t</div>
  202. \t\t\t</div>
  203. \t\t\t<div>
  204. \t\t\t\t<div class=\"hedaer-trailing\">
  205. \t\t\t\t\t{{ include('Block/login.twig') }}
  206. \t\t\t\t\t{{ include('Block/cart.twig') }}
  207. \t\t\t\t</div>
  208. \t\t\t</div>
  209. \t\t</div>
  210. \t</nav>
  211. \t{# SP用検索フォーム #}
  212. \t<div class=\"d-md-none mt-6 xs-gutter\">
  213. \t\t{{ render(path('block_search_product')) }}
  214. \t</div>
  215. \t{# トップエージ以外はnewsを表示しない #}
  216. \t{% set request_uri = app.request.server.get('REQUEST_URI') %}
  217. \t{% if request_uri == '/'  %}
  218. \t{% set NewsList = repository('Eccube\\\\Entity\\\\News').getList() %}
  219. \t<div class=\"mt-4 mt-md-0 xs-gutter\">
  220. \t\t<div id=\"header-news\" class=\"header-news\">
  221. \t\t\t{% for News in NewsList %}
  222. \t\t\t\t{% if loop.index == 1 %}
  223.             \t<a href={{ url('news_detail',  {'id': News.id}) }} class=\"header-news__text\">
  224. \t\t\t\t\t{{ News.title }}
  225. \t\t\t\t</a>
  226. \t\t\t\t{% endif %}
  227. \t\t\t{% endfor %}
  228. \t\t</div>
  229. \t</div>
  230. \t{% endif %}
  231. <div>
  232. ""Block/header.twig""/home/xs804421/stg.denzai-bluewood.com/public_html/app/template/default/Block/header.twig");
  233.     }
  234. }