<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Block/category_nav_pc.twig */
class __TwigTemplate_92d88902626cd88adeddb183e609d3bf extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/category_nav_pc.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/category_nav_pc.twig"));
// line 11
$context["Categories"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "getList", [], "method", false, false, false, 11);
// line 12
echo "
";
// line 28
echo "
";
// line 30
$macros["__internal_parse_1"] = $this->macros["__internal_parse_1"] = $this;
// line 31
echo "
<div class=\"ec-categoryNaviRole\">
\t<div id=\"categorynav_title\" class=\"ec-headerCategoryArea__heading\">
<p>";
// line 34
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Product List"), "html", null, true);
echo "</p>
</div>
<div class=\"ec-itemNav\">
<ul class=\"ec-itemNav__nav\">
";
// line 38
$context['_parent'] = $context;
$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); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 39
echo " <li>
";
// line 40
echo twig_call_macro($macros["__internal_parse_1"], "macro_tree", [$context["Category"]], 40, $context, $this->getSourceContext());
echo "
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 43
echo " </ul>
</div>
</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 13
public function macro_tree($__Category__ = null, ...$__varargs__)
{
$macros = $this->macros;
$context = $this->env->mergeGlobals([
"Category" => $__Category__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "tree"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "tree"));
// line 14
echo " ";
$macros["__internal_parse_0"] = $this;
// line 15
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, 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", false, false, false, 15), "html", null, true);
echo "\">
";
// line 16
echo twig_escape_filter($this->env, 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", false, false, false, 16), "html", null, true);
echo "
</a>
";
// line 18
if ((twig_length_filter($this->env, 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); })()), "children", [], "any", false, false, false, 18)) > 0)) {
// line 19
echo " <ul>
";
// line 20
$context['_parent'] = $context;
$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", false, false, false, 20));
foreach ($context['_seq'] as $context["_key"] => $context["ChildCategory"]) {
// line 21
echo " <li>
";
// line 22
echo twig_call_macro($macros["__internal_parse_0"], "macro_tree", [$context["ChildCategory"]], 22, $context, $this->getSourceContext());
echo "
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ChildCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 25
echo " </ul>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
} finally {
ob_end_clean();
}
}
public function getTemplateName()
{
return "Block/category_nav_pc.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set Categories = repository('Eccube\\\\Entity\\\\Category').getList() %}
{% macro tree(Category) %}
{% from _self import tree %}
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\">
{{ Category.name }}
</a>
{% if Category.children|length > 0 %}
<ul>
{% for ChildCategory in Category.children %}
<li>
{{ tree(ChildCategory) }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
<div class=\"ec-categoryNaviRole\">
\t<div id=\"categorynav_title\" class=\"ec-headerCategoryArea__heading\">
<p>{{ 'Product List'|trans }}</p>
</div>
<div class=\"ec-itemNav\">
<ul class=\"ec-itemNav__nav\">
{% for Category in Categories %}
<li>
{{ tree(Category) }}
</li>
{% endfor %}
</ul>
</div>
</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");
}
}