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