var/cache/dev/twig/cb/cb9f6961d8ff43941800dc3338430d6b.php line 35

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