var/cache/dev/twig/d5/d5f32f869f00733c2cc3507e741c81fc.php line 33

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_ec4ef2834ccc1ab0a37318517a90bf4a 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/category_nav_pc.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/category_nav_pc.twig"));
  33.         // line 11
  34.         $context["Categories"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "getList", [], "method"falsefalsefalse11);
  35.         // line 12
  36.         echo "
  37. ";
  38.         // line 28
  39.         echo "
  40. ";
  41.         // line 30
  42.         $macros["__internal_parse_1"] = $this->macros["__internal_parse_1"] = $this;
  43.         // line 31
  44.         echo "
  45. <div class=\"ec-categoryNaviRole\">
  46.     <div class=\"ec-itemNav\">
  47.         <ul class=\"ec-itemNav__nav\">
  48.             ";
  49.         // line 35
  50.         $context['_parent'] = $context;
  51.         $context['_seq'] = twig_ensure_traversable((isset($context["Categories"]) || array_key_exists("Categories"$context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.'35$this->source); })()));
  52.         foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  53.             // line 36
  54.             echo "                <li data-aos=\"fade-down\">
  55.                     ";
  56.             // line 37
  57.             echo twig_call_macro($macros["__internal_parse_1"], "macro_tree", [$context["Category"]], 37$context$this->getSourceContext());
  58.             echo "
  59.                 </li>
  60.             ";
  61.         }
  62.         $_parent $context['_parent'];
  63.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  64.         $context array_intersect_key($context$_parent) + $_parent;
  65.         // line 40
  66.         echo "        </ul>
  67.     </div>
  68. </div>
  69. ";
  70.         
  71.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  72.         
  73.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  74.     }
  75.     // line 13
  76.     public function macro_tree($__Category__ null, ...$__varargs__)
  77.     {
  78.         $macros $this->macros;
  79.         $context $this->env->mergeGlobals([
  80.             "Category" => $__Category__,
  81.             "varargs" => $__varargs__,
  82.         ]);
  83.         $blocks = [];
  84.         ob_start();
  85.         try {
  86.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  87.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""tree"));
  88.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  89.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""tree"));
  90.             // line 14
  91.             echo "    ";
  92.             $macros["__internal_parse_0"] = $this;
  93.             // line 15
  94.             echo "    <a href=\"";
  95.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  96.             echo "?category_id=";
  97.             echo twig_escape_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.'15$this->source); })()), "id", [], "any"falsefalsefalse15), "html"nulltrue);
  98.             echo "\">
  99.         ";
  100.             // line 16
  101.             echo twig_escape_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.'16$this->source); })()), "name", [], "any"falsefalsefalse16), "html"nulltrue);
  102.             echo "
  103.     </a>
  104.     ";
  105.             // line 18
  106.             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.'18$this->source); })()), "children", [], "any"falsefalsefalse18)) > 0)) {
  107.                 // line 19
  108.                 echo "        <ul>
  109.             ";
  110.                 // line 20
  111.                 $context['_parent'] = $context;
  112.                 $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.'20$this->source); })()), "children", [], "any"falsefalsefalse20));
  113.                 foreach ($context['_seq'] as $context["_key"] => $context["ChildCategory"]) {
  114.                     // line 21
  115.                     echo "                <li>
  116.                     ";
  117.                     // line 22
  118.                     echo twig_call_macro($macros["__internal_parse_0"], "macro_tree", [$context["ChildCategory"]], 22$context$this->getSourceContext());
  119.                     echo "
  120.                 </li>
  121.             ";
  122.                 }
  123.                 $_parent $context['_parent'];
  124.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ChildCategory'], $context['_parent'], $context['loop']);
  125.                 $context array_intersect_key($context$_parent) + $_parent;
  126.                 // line 25
  127.                 echo "        </ul>
  128.     ";
  129.             }
  130.             
  131.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  132.             
  133.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  134.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  135.         } finally {
  136.             ob_end_clean();
  137.         }
  138.     }
  139.     public function getTemplateName()
  140.     {
  141.         return "Block/category_nav_pc.twig";
  142.     }
  143.     public function isTraitable()
  144.     {
  145.         return false;
  146.     }
  147.     public function getDebugInfo()
  148.     {
  149.         return array (  143 => 25,  134 => 22,  131 => 21,  127 => 20,  124 => 19,  122 => 18,  117 => 16,  110 => 15,  107 => 14,  88 => 13,  75 => 40,  66 => 37,  63 => 36,  59 => 35,  53 => 31,  51 => 30,  48 => 28,  45 => 12,  43 => 11,);
  150.     }
  151.     public function getSourceContext()
  152.     {
  153.         return new Source("{#
  154. This file is part of EC-CUBE
  155. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  156. http://www.ec-cube.co.jp/
  157. For the full copyright and license information, please view the LICENSE
  158. file that was distributed with this source code.
  159. #}
  160. {% set Categories = repository('Eccube\\\\Entity\\\\Category').getList() %}
  161. {% macro tree(Category) %}
  162.     {% from _self import tree %}
  163.     <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">
  164.         {{ Category.name }}
  165.     </a>
  166.     {% if Category.children|length > 0 %}
  167.         <ul>
  168.             {% for ChildCategory in Category.children %}
  169.                 <li>
  170.                     {{ tree(ChildCategory) }}
  171.                 </li>
  172.             {% endfor %}
  173.         </ul>
  174.     {% endif %}
  175. {% endmacro %}
  176. {# @see https://github.com/bolt/bolt/pull/2388 #}
  177. {% from _self import tree %}
  178. <div class=\"ec-categoryNaviRole\">
  179.     <div class=\"ec-itemNav\">
  180.         <ul class=\"ec-itemNav__nav\">
  181.             {% for Category in Categories %}
  182.                 <li data-aos=\"fade-down\">
  183.                     {{ tree(Category) }}
  184.                 </li>
  185.             {% endfor %}
  186.         </ul>
  187.     </div>
  188. </div>
  189. ""Block/category_nav_pc.twig""/home/daishi37x/dis61.work/public_html/shosen-east.dis61.work/shop/app/template/default/Block/category_nav_pc.twig");
  190.     }
  191. }