var/cache/dev/twig/c2/c29aefe738d3981a403c95a75a87966d.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. /* Block/category_nav_pc.twig */
  14. class __TwigTemplate_92d88902626cd88adeddb183e609d3bf 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. \t<div id=\"categorynav_title\" class=\"ec-headerCategoryArea__heading\">
  47.         <p>";
  48.         // line 34
  49.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Product List"), "html"nulltrue);
  50.         echo "</p>
  51.     </div>
  52.     <div class=\"ec-itemNav\">
  53.         <ul class=\"ec-itemNav__nav\">
  54.             ";
  55.         // line 38
  56.         $context['_parent'] = $context;
  57.         $context['_seq'] = twig_ensure_traversable((isset($context["Categories"]) || array_key_exists("Categories"$context) ? $context["Categories"] : (function () { throw new RuntimeError('Variable "Categories" does not exist.'38$this->source); })()));
  58.         foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
  59.             // line 39
  60.             echo "                <li>
  61.                     ";
  62.             // line 40
  63.             echo twig_call_macro($macros["__internal_parse_1"], "macro_tree", [$context["Category"]], 40$context$this->getSourceContext());
  64.             echo "
  65.                 </li>
  66.             ";
  67.         }
  68.         $_parent $context['_parent'];
  69.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
  70.         $context array_intersect_key($context$_parent) + $_parent;
  71.         // line 43
  72.         echo "        </ul>
  73.     </div>
  74. </div>";
  75.         
  76.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  77.         
  78.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  79.     }
  80.     // line 13
  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 14
  96.             echo "    ";
  97.             $macros["__internal_parse_0"] = $this;
  98.             // line 15
  99.             echo "    <a href=\"";
  100.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  101.             echo "?category_id=";
  102.             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);
  103.             echo "\">
  104.         ";
  105.             // line 16
  106.             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);
  107.             echo "
  108.     </a>
  109.     ";
  110.             // line 18
  111.             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)) {
  112.                 // line 19
  113.                 echo "        <ul>
  114.             ";
  115.                 // line 20
  116.                 $context['_parent'] = $context;
  117.                 $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));
  118.                 foreach ($context['_seq'] as $context["_key"] => $context["ChildCategory"]) {
  119.                     // line 21
  120.                     echo "                <li>
  121.                     ";
  122.                     // line 22
  123.                     echo twig_call_macro($macros["__internal_parse_0"], "macro_tree", [$context["ChildCategory"]], 22$context$this->getSourceContext());
  124.                     echo "
  125.                 </li>
  126.             ";
  127.                 }
  128.                 $_parent $context['_parent'];
  129.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ChildCategory'], $context['_parent'], $context['loop']);
  130.                 $context array_intersect_key($context$_parent) + $_parent;
  131.                 // line 25
  132.                 echo "        </ul>
  133.     ";
  134.             }
  135.             
  136.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  137.             
  138.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  139.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  140.         } finally {
  141.             ob_end_clean();
  142.         }
  143.     }
  144.     public function getTemplateName()
  145.     {
  146.         return "Block/category_nav_pc.twig";
  147.     }
  148.     public function isTraitable()
  149.     {
  150.         return false;
  151.     }
  152.     public function getDebugInfo()
  153.     {
  154.         return array (  148 => 25,  139 => 22,  136 => 21,  132 => 20,  129 => 19,  127 => 18,  122 => 16,  115 => 15,  112 => 14,  93 => 13,  81 => 43,  72 => 40,  69 => 39,  65 => 38,  58 => 34,  53 => 31,  51 => 30,  48 => 28,  45 => 12,  43 => 11,);
  155.     }
  156.     public function getSourceContext()
  157.     {
  158.         return new Source("{#
  159. This file is part of EC-CUBE
  160. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  161. http://www.ec-cube.co.jp/
  162. For the full copyright and license information, please view the LICENSE
  163. file that was distributed with this source code.
  164. #}
  165. {% set Categories = repository('Eccube\\\\Entity\\\\Category').getList() %}
  166. {% macro tree(Category) %}
  167.     {% from _self import tree %}
  168.     <a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">
  169.         {{ Category.name }}
  170.     </a>
  171.     {% if Category.children|length > 0 %}
  172.         <ul>
  173.             {% for ChildCategory in Category.children %}
  174.                 <li>
  175.                     {{ tree(ChildCategory) }}
  176.                 </li>
  177.             {% endfor %}
  178.         </ul>
  179.     {% endif %}
  180. {% endmacro %}
  181. {# @see https://github.com/bolt/bolt/pull/2388 #}
  182. {% from _self import tree %}
  183. <div class=\"ec-categoryNaviRole\">
  184. \t<div id=\"categorynav_title\" class=\"ec-headerCategoryArea__heading\">
  185.         <p>{{ 'Product List'|trans }}</p>
  186.     </div>
  187.     <div class=\"ec-itemNav\">
  188.         <ul class=\"ec-itemNav__nav\">
  189.             {% for Category in Categories %}
  190.                 <li>
  191.                     {{ tree(Category) }}
  192.                 </li>
  193.             {% endfor %}
  194.         </ul>
  195.     </div>
  196. </div>""Block/category_nav_pc.twig""/home/owl/owl-horie.com/public_html/test-eccube.owl-horie.com/app/template/cosme41/Block/category_nav_pc.twig");
  197.     }
  198. }