var/cache/dev/twig/b6/b6a24052b8aa16e53a4ac8efb1388b1b.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/category_nav_pc.twig */
  14. class __TwigTemplate_c0dfe84efd1ec52b094f922aa6773712 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/category_nav_pc.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/category_nav_pc.twig"));
  35.         // line 11
  36.         $context["Categories"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "getList", [], "method"falsefalsetrue11);
  37.         // line 12
  38.         echo "
  39. ";
  40.         // line 13
  41.         if (((twig_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.'13$this->source); })()), "request", [], "any"falsefalsetrue13), "get", [=> "_route"], "method"falsefalsetrue13) == "product_list") || (twig_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.'13$this->source); })()), "request", [], "any"falsefalsetrue13), "get", [=> "_route"], "method"falsefalsetrue13) == "subsc_items"))) {
  42.             // line 15
  43.             echo "    ";
  44.             // line 32
  45.             echo "    ";
  46.             $macros["__internal_parse_1"] = $this->macros["__internal_parse_1"] = $this;
  47.             // line 33
  48.             echo "
  49.     <div class=\"ec-categoryNaviRole\">
  50.         <div class=\"ec-itemNav\">
  51.             <ul class=\"ec-itemNav__nav\">
  52.                 ";
  53.             // line 37
  54.             $context['_parent'] = $context;
  55.             $context['_seq'] = twig_ensure_traversable((isset($context["Categories"]) || array_key_exists("Categories"$context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.'37$this->source); })()));
  56.             foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  57.                 // line 38
  58.                 echo "                    <li>
  59.                         ";
  60.                 // line 39
  61.                 echo twig_call_macro($macros["__internal_parse_1"], "macro_tree", [$context["Category"]], 39$context$this->getSourceContext());
  62.                 echo "
  63.                     </li>
  64.                 ";
  65.             }
  66.             $_parent $context['_parent'];
  67.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  68.             $context array_intersect_key($context$_parent) + $_parent;
  69.             // line 42
  70.             echo "            </ul>
  71.         </div>
  72.     </div>
  73. ";
  74.         }
  75.         
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  77.         
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  79.     }
  80.     // line 15
  81.     public function macro_tree($__Category__ null, ...$__varargs__)
  82.     {
  83.         $macros $this->macros;
  84.         $context $this->env->mergeGlobals([
  85.             "Category" => $__Category__,
  86.             "varargs" => $__varargs__,
  87.         ]);
  88.         $blocks = [];
  89.         ob_start();
  90.         try {
  91.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  92.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""tree"));
  93.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  94.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""tree"));
  95.             // line 16
  96.             echo "        ";
  97.             $macros["__internal_parse_0"] = $this;
  98.             // line 17
  99.             echo "        ";
  100.             if ((twig_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.'17$this->source); })()), "request", [], "any"falsefalsetrue17), "get", [=> "_route"], "method"falsefalsetrue17) == "product_list")) {
  101.                 // line 18
  102.                 echo "            <a href=\"#cat_";
  103.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'18$this->source); })()), "id", [], "any"falsefalsetrue18), 18$this->source), "html"nulltrue);
  104.                 echo "\"><i class=\"fas fa-chevron-down\"></i>";
  105.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(("front.block.category.list_text.id." $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'18$this->source); })()), "id", [], "any"falsefalsetrue18), 18$this->source))), "html"nulltrue);
  106.                 echo "</a>
  107.         ";
  108.             } else {
  109.                 // line 20
  110.                 echo "            <a href=\"#cat_";
  111.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'20$this->source); })()), "id", [], "any"falsefalsetrue20), 20$this->source), "html"nulltrue);
  112.                 echo "\"><i class=\"fas fa-chevron-down\"></i>";
  113.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(("front.block.category.list_text.id." $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'20$this->source); })()), "id", [], "any"falsefalsetrue20), 20$this->source))), "html"nulltrue);
  114.                 echo "</a>
  115.         ";
  116.             }
  117.             // line 22
  118.             echo "        ";
  119.             if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'22$this->source); })()), "children", [], "any"falsefalsetrue22)) > 0)) {
  120.                 // line 23
  121.                 echo "            <ul>
  122.                 ";
  123.                 // line 24
  124.                 $context['_parent'] = $context;
  125.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'24$this->source); })()), "children", [], "any"falsefalsetrue24));
  126.                 foreach ($context['_seq'] as $context["_key"] => $context["ChildCategory"]) {
  127.                     // line 25
  128.                     echo "                    <li>
  129.                         ";
  130.                     // line 26
  131.                     echo twig_call_macro($macros["__internal_parse_0"], "macro_tree", [$context["ChildCategory"]], 26$context$this->getSourceContext());
  132.                     echo "
  133.                     </li>
  134.                 ";
  135.                 }
  136.                 $_parent $context['_parent'];
  137.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ChildCategory'], $context['_parent'], $context['loop']);
  138.                 $context array_intersect_key($context$_parent) + $_parent;
  139.                 // line 29
  140.                 echo "            </ul>
  141.         ";
  142.             }
  143.             // line 31
  144.             echo "    ";
  145.             
  146.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  147.             
  148.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  149.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  150.         } finally {
  151.             ob_end_clean();
  152.         }
  153.     }
  154.     public function getTemplateName()
  155.     {
  156.         return "Block/category_nav_pc.twig";
  157.     }
  158.     public function isTraitable()
  159.     {
  160.         return false;
  161.     }
  162.     public function getDebugInfo()
  163.     {
  164.         return array (  160 => 31,  156 => 29,  147 => 26,  144 => 25,  140 => 24,  137 => 23,  134 => 22,  126 => 20,  118 => 18,  115 => 17,  112 => 16,  93 => 15,  79 => 42,  70 => 39,  67 => 38,  63 => 37,  57 => 33,  54 => 32,  52 => 15,  50 => 13,  47 => 12,  45 => 11,);
  165.     }
  166.     public function getSourceContext()
  167.     {
  168.         return new Source("{#
  169. This file is part of EC-CUBE
  170. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  171. http://www.ec-cube.co.jp/
  172. For the full copyright and license information, please view the LICENSE
  173. file that was distributed with this source code.
  174. #}
  175. {% set Categories = repository('Eccube\\\\Entity\\\\Category').getList() %}
  176. {% if app.request.get('_route') == 'product_list' or app.request.get('_route') == 'subsc_items' %}
  177. {# 商品一覧ページの場合(ページ内遷移) #}
  178.     {% macro tree(Category) %}
  179.         {% from _self import tree %}
  180.         {% if app.request.get('_route') == 'product_list'%}
  181.             <a href=\"#cat_{{ Category.id }}\"><i class=\"fas fa-chevron-down\"></i>{{ ('front.block.category.list_text.id.' ~ Category.id)|trans }}</a>
  182.         {% else %}
  183.             <a href=\"#cat_{{ Category.id }}\"><i class=\"fas fa-chevron-down\"></i>{{ ('front.block.category.list_text.id.' ~ Category.id)|trans }}</a>
  184.         {% endif %}
  185.         {% if Category.children|length > 0 %}
  186.             <ul>
  187.                 {% for ChildCategory in Category.children %}
  188.                     <li>
  189.                         {{ tree(ChildCategory) }}
  190.                     </li>
  191.                 {% endfor %}
  192.             </ul>
  193.         {% endif %}
  194.     {% endmacro %}
  195.     {% from _self import tree %}
  196.     <div class=\"ec-categoryNaviRole\">
  197.         <div class=\"ec-itemNav\">
  198.             <ul class=\"ec-itemNav__nav\">
  199.                 {% for Category in Categories %}
  200.                     <li>
  201.                         {{ tree(Category) }}
  202.                     </li>
  203.                 {% endfor %}
  204.             </ul>
  205.         </div>
  206.     </div>
  207. {% endif %}""Block/category_nav_pc.twig""/home/aonchappy/aonchappy.xsrv.jp/public_html/app/template/default/Block/category_nav_pc.twig");
  208.     }
  209.     
  210.     public function checkSecurity()
  211.     {
  212.         static $tags = array("set" => 11"if" => 13"from" => 32"for" => 37"macro" => 15);
  213.         static $filters = array("escape" => 18"trans" => 18"length" => 22);
  214.         static $functions = array("repository" => 11);
  215.         try {
  216.             $this->sandbox->checkSecurity(
  217.                 ['set''if''from''for''macro'],
  218.                 ['escape''trans''length'],
  219.                 ['repository']
  220.             );
  221.         } catch (SecurityError $e) {
  222.             $e->setSourceContext($this->source);
  223.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  224.                 $e->setTemplateLine($tags[$e->getTagName()]);
  225.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  226.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  227.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  228.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  229.             }
  230.             throw $e;
  231.         }
  232.     }
  233. }