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