var/cache/dev/twig/c8/c87ffd0919b63c4d18eb6aa31d5efdc0.php line 43

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. /* index.twig */
  14. class __TwigTemplate_8ef0c0ad420cee68703d0a28eee7e508 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->blocks = [
  23.             'stylesheet' => [$this'block_stylesheet'],
  24.             'javascript' => [$this'block_javascript'],
  25.             'sub_area' => [$this'block_sub_area'],
  26.             'main_top' => [$this'block_main_top'],
  27.         ];
  28.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  29.         $this->checkSecurity();
  30.     }
  31.     protected function doGetParent(array $context)
  32.     {
  33.         // line 1
  34.         return "default_frame.twig";
  35.     }
  36.     protected function doDisplay(array $context, array $blocks = [])
  37.     {
  38.         $macros $this->macros;
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""index.twig"));
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""index.twig"));
  43.         // line 3
  44.         $context["body_id"] = "index";
  45.         // line 4
  46.         $context["NewsList"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\News"), "getList", [], "method"falsefalsetrue4);
  47.         // line 1
  48.         $this->parent $this->loadTemplate("default_frame.twig""index.twig"1);
  49.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  50.         
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  52.         
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  54.     }
  55.     // line 5
  56.     public function block_stylesheet($context, array $blocks = [])
  57.     {
  58.         $macros $this->macros;
  59.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  60.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  61.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  62.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheet"));
  63.         // line 6
  64.         echo "    
  65. ";
  66.         
  67.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  68.         
  69.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  70.     }
  71.     // line 9
  72.     public function block_javascript($context, array $blocks = [])
  73.     {
  74.         $macros $this->macros;
  75.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  77.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  79.         
  80.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  81.         
  82.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  83.     }
  84.     // line 11
  85.     public function block_sub_area($context, array $blocks = [])
  86.     {
  87.         $macros $this->macros;
  88.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  89.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sub_area"));
  90.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  91.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sub_area"));
  92.         
  93.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  94.         
  95.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  96.     }
  97.     // line 12
  98.     public function block_main_top($context, array $blocks = [])
  99.     {
  100.         $macros $this->macros;
  101.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  102.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main_top"));
  103.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  104.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main_top"));
  105.         // line 13
  106.         echo "    <section class=\"mv\">
  107.         <picture>
  108.           <source media=\"(min-width: 769px)\" srcset=\"";
  109.         // line 15
  110.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/top/mv01.jpg"), "html"nulltrue);
  111.         echo "\">
  112.           <img src=\"";
  113.         // line 16
  114.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/top/mv01_sp.jpg"), "html"nulltrue);
  115.         echo "\" alt=\"店内イメージ\">
  116.         </picture>
  117.         ";
  118.         // line 18
  119.         if ((twig_length_filter($this->env, (isset($context["NewsList"]) || array_key_exists("NewsList"$context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.'18$this->source); })())) > 0)) {
  120.             // line 19
  121.             echo "        <dl class=\"news\">
  122.           <dt>News<span>お知らせ</span></dt>
  123.           ";
  124.             // line 21
  125.             $context['_parent'] = $context;
  126.             $context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList"$context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.'21$this->source); })()));
  127.             $context['loop'] = [
  128.               'parent' => $context['_parent'],
  129.               'index0' => 0,
  130.               'index'  => 1,
  131.               'first'  => true,
  132.             ];
  133.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  134.                 $length count($context['_seq']);
  135.                 $context['loop']['revindex0'] = $length 1;
  136.                 $context['loop']['revindex'] = $length;
  137.                 $context['loop']['length'] = $length;
  138.                 $context['loop']['last'] = === $length;
  139.             }
  140.             foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
  141.                 // line 22
  142.                 echo "          ";
  143.                 if (twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsetrue22)) {
  144.                     // line 23
  145.                     echo "          <dd>
  146.             <a href=\"";
  147.                     // line 24
  148.                     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"falsefalsetrue24)]), "html"nulltrue);
  149.                     echo "\">
  150.               <span>";
  151.                     // line 25
  152.                     echo twig_escape_filter($this->envtwig_date_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["News"], "publish_date", [], "any"falsefalsetrue25), 25$this->source), "Y.m.d"), "html"nulltrue);
  153.                     echo "</span>
  154.               <p>";
  155.                     // line 26
  156.                     echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["News"], "title", [], "any"falsefalsetrue26), 26$this->source), "html"nulltrue);
  157.                     echo "</p>
  158.             </a>
  159.           </dd>
  160.           ";
  161.                 }
  162.                 // line 30
  163.                 echo "          ";
  164.                 ++$context['loop']['index0'];
  165.                 ++$context['loop']['index'];
  166.                 $context['loop']['first'] = false;
  167.                 if (isset($context['loop']['length'])) {
  168.                     --$context['loop']['revindex0'];
  169.                     --$context['loop']['revindex'];
  170.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  171.                 }
  172.             }
  173.             $_parent $context['_parent'];
  174.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
  175.             $context array_intersect_key($context$_parent) + $_parent;
  176.             // line 31
  177.             echo "        </dl>
  178.         ";
  179.         }
  180.         // line 33
  181.         echo "      </section>
  182. ";
  183.         
  184.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  185.         
  186.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  187.     }
  188.     public function getTemplateName()
  189.     {
  190.         return "index.twig";
  191.     }
  192.     public function isTraitable()
  193.     {
  194.         return false;
  195.     }
  196.     public function getDebugInfo()
  197.     {
  198.         return array (  210 => 33,  206 => 31,  192 => 30,  185 => 26,  181 => 25,  177 => 24,  174 => 23,  171 => 22,  154 => 21,  150 => 19,  148 => 18,  143 => 16,  139 => 15,  135 => 13,  125 => 12,  107 => 11,  89 => 9,  78 => 6,  68 => 5,  57 => 1,  55 => 4,  53 => 3,  40 => 1,);
  199.     }
  200.     public function getSourceContext()
  201.     {
  202.         return new Source("{% extends 'default_frame.twig' %}
  203. {% set body_id = 'index' %}
  204. {% set NewsList = repository('Eccube\\\\Entity\\\\News').getList() %}
  205. {% block stylesheet %}
  206.     
  207. {% endblock %}
  208. {% block javascript %}
  209. {% endblock javascript %}
  210. {% block sub_area %}{% endblock %}
  211. {% block main_top %}
  212.     <section class=\"mv\">
  213.         <picture>
  214.           <source media=\"(min-width: 769px)\" srcset=\"{{ asset('assets/img/top/mv01.jpg') }}\">
  215.           <img src=\"{{ asset('assets/img/top/mv01_sp.jpg') }}\" alt=\"店内イメージ\">
  216.         </picture>
  217.         {% if NewsList|length > 0 %}
  218.         <dl class=\"news\">
  219.           <dt>News<span>お知らせ</span></dt>
  220.           {% for News in NewsList %}
  221.           {% if loop.first %}
  222.           <dd>
  223.             <a href=\"{{ url('news_detail', {'id': News.id}) }}\">
  224.               <span>{{ News.publish_date|date(\"Y.m.d\") }}</span>
  225.               <p>{{ News.title }}</p>
  226.             </a>
  227.           </dd>
  228.           {% endif %}
  229.           {% endfor %}
  230.         </dl>
  231.         {% endif %}
  232.       </section>
  233. {% endblock %}""index.twig""/home/hr67ekh16/u-arts-mirror.jp/public_html/app/template/uarts/index.twig");
  234.     }
  235.     
  236.     public function checkSecurity()
  237.     {
  238.         static $tags = array("set" => 3"if" => 18"for" => 21);
  239.         static $filters = array("escape" => 15"length" => 18"date" => 25);
  240.         static $functions = array("repository" => 4"asset" => 15"url" => 24);
  241.         try {
  242.             $this->sandbox->checkSecurity(
  243.                 ['set''if''for'],
  244.                 ['escape''length''date'],
  245.                 ['repository''asset''url']
  246.             );
  247.         } catch (SecurityError $e) {
  248.             $e->setSourceContext($this->source);
  249.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  250.                 $e->setTemplateLine($tags[$e->getTagName()]);
  251.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  252.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  253.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  254.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  255.             }
  256.             throw $e;
  257.         }
  258.     }
  259. }