<?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/drawer_search.twig */
class __TwigTemplate_ad5b52435873737589f4f6749acd6292 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 = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
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/drawer_search.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/drawer_search.twig"));
// line 1
echo "<div class=\"search_drawer_box\">
<i id=\"js-header-search-close\" class=\"fas fa-times search_box_close\"></i>
<div class=\"search_box_head_white\"></div>
<div class=\"search_box_head_blue\"></div>
<div class=\"search_box_ears\"><img src=\"";
// line 5
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/common/search_ears.svg", "user_data"), "html", null, true);
echo "\" alt=\"宇宙グッズを探す\" /></div>
<div class=\"search_box_top\"></div>
<div class=\"search_drawer_box_inner\">
<p class=\"search_box_title\">キーワードで探す</p>
";
// line 9
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_search_product"));
echo "
<p class=\"search_box_title\">カテゴリで探す</p>
<div>
";
// line 12
$context["Categories"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "getList", [], "method", false, false, true, 12);
// line 13
echo " ";
// line 60
echo " ";
// line 61
echo " ";
$macros["__internal_parse_8"] = $this->macros["__internal_parse_8"] = $this;
// line 62
echo " <div class=\"ec-headerCategoryArea\">
<div class=\"ec-itemNav\">
<ul class=\"ec-itemNav__nav\">
";
// line 65
$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.', 65, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 66
echo " ";
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Category"], "ProductCategories", [], "any", false, false, true, 66)) > 0)) {
// line 67
echo " <li>";
echo twig_call_macro($macros["__internal_parse_8"], "macro_tree", [$context["Category"]], 67, $context, $this->getSourceContext());
echo "</li>
";
}
// line 69
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 70
echo " </ul>
</div>
</div>
</div>
<div class=\"search_box_bottom\"><a href=\"";
// line 74
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "\">すべての宇宙グッズ</a></div>
</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_7"] = $this;
// line 15
echo " ";
// line 16
echo " ";
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.', 16, $this->source); })()), "ProductCategories", [], "any", false, false, true, 16)) > 0) && (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); })()), "id", [], "any", false, false, true, 16) > 178))) {
// line 17
echo " ";
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.', 17, $this->source); })()), "children", [], "any", false, false, true, 17)) > 0)) {
// line 18
echo " ";
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); })()), "parents", [], "any", false, false, true, 18)) > 0)) {
// line 19
echo " <p class=\"second_title category_id_";
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.', 19, $this->source); })()), "id", [], "any", false, false, true, 19), 19, $this->source), "html", null, true);
echo "\"><span class=\"category_icon\"></span>";
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.', 19, $this->source); })()), "name", [], "any", false, false, true, 19), 19, $this->source), "html", null, true);
echo "<span class=\"category_length\">";
echo twig_escape_filter($this->env, twig_length_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.', 19, $this->source); })()), "ProductCategories", [], "any", false, false, true, 19), 19, $this->source)), "html", null, true);
echo "</span></p>
<div class=\"category_bottom second_bottom\"></div>
<ul class=\"second_children category_id_";
// line 21
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.', 21, $this->source); })()), "id", [], "any", false, false, true, 21), 21, $this->source), "html", null, true);
echo "\">
<li>
<a href=\"";
// line 23
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
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.', 23, $this->source); })()), "id", [], "any", false, false, true, 23), 23, $this->source), "html", null, true);
echo "\" class=\"category_id_";
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.', 23, $this->source); })()), "id", [], "any", false, false, true, 23), 23, $this->source), "html", null, true);
echo "\">
<span class=\"category_icon category_all\"></span>
すべての";
// line 25
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.', 25, $this->source); })()), "name", [], "any", false, false, true, 25), 25, $this->source), "html", null, true);
echo "<span class=\"category_length\">";
echo twig_escape_filter($this->env, twig_length_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.', 25, $this->source); })()), "ProductCategories", [], "any", false, false, true, 25), 25, $this->source)), "html", null, true);
echo "</span>
</a>
<div class=\"category_bottom third_bottom\"></div>
</li>
";
} else {
// line 30
echo " <p class=\"first_title category_id_";
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.', 30, $this->source); })()), "id", [], "any", false, false, true, 30), 30, $this->source), "html", null, true);
echo "\"><span></span>";
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.', 30, $this->source); })()), "name", [], "any", false, false, true, 30), 30, $this->source), "html", null, true);
echo "</p>
<div class=\"category_bottom\"></div>
<ul class=\"first_children category_id_";
// line 32
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.', 32, $this->source); })()), "id", [], "any", false, false, true, 32), 32, $this->source), "html", null, true);
echo "\">
<li>
<a href=\"";
// line 34
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
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.', 34, $this->source); })()), "id", [], "any", false, false, true, 34), 34, $this->source), "html", null, true);
echo "\" class=\"category_id_";
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.', 34, $this->source); })()), "id", [], "any", false, false, true, 34), 34, $this->source), "html", null, true);
echo "\">
<span class=\"category_icon category_all\"></span>
すべての";
// line 36
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.', 36, $this->source); })()), "name", [], "any", false, false, true, 36), 36, $this->source), "html", null, true);
echo "<span class=\"category_length\">";
echo twig_escape_filter($this->env, twig_length_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.', 36, $this->source); })()), "ProductCategories", [], "any", false, false, true, 36), 36, $this->source)), "html", null, true);
echo "</span>
</a>
<div class=\"category_bottom second_bottom\"></div>
</li>
";
}
// line 41
echo " ";
$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.', 41, $this->source); })()), "children", [], "any", false, false, true, 41));
foreach ($context['_seq'] as $context["_key"] => $context["ChildCategory"]) {
// line 42
echo " <li>
";
// line 43
echo twig_call_macro($macros["__internal_parse_7"], "macro_tree", [$context["ChildCategory"]], 43, $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 46
echo " </ul>
";
} else {
// line 48
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
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.', 48, $this->source); })()), "id", [], "any", false, false, true, 48), 48, $this->source), "html", null, true);
echo "\" class=\"category_id_";
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.', 48, $this->source); })()), "id", [], "any", false, false, true, 48), 48, $this->source), "html", null, true);
echo "\">
<span class=\"category_icon\"></span>
";
// line 50
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.', 50, $this->source); })()), "name", [], "any", false, false, true, 50), 50, $this->source), "html", null, true);
echo "<span class=\"category_length\">";
echo twig_escape_filter($this->env, twig_length_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.', 50, $this->source); })()), "ProductCategories", [], "any", false, false, true, 50), 50, $this->source)), "html", null, true);
echo "</span>
</a>
";
// line 52
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.', 52, $this->source); })()), "parents", [], "any", false, false, true, 52)) > 1)) {
// line 53
echo " <div class=\"category_bottom third_bottom\"></div>
";
} else {
// line 55
echo " <div class=\"category_bottom second_bottom\"></div>
";
}
// line 57
echo " ";
}
// line 58
echo " ";
}
// line 59
echo " ";
$__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/drawer_search.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 269 => 59, 266 => 58, 263 => 57, 259 => 55, 255 => 53, 253 => 52, 246 => 50, 236 => 48, 232 => 46, 223 => 43, 220 => 42, 215 => 41, 205 => 36, 196 => 34, 191 => 32, 183 => 30, 173 => 25, 164 => 23, 159 => 21, 149 => 19, 146 => 18, 143 => 17, 140 => 16, 138 => 15, 135 => 14, 116 => 13, 103 => 74, 97 => 70, 91 => 69, 85 => 67, 82 => 66, 78 => 65, 73 => 62, 70 => 61, 68 => 60, 66 => 13, 64 => 12, 58 => 9, 51 => 5, 45 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"search_drawer_box\">
<i id=\"js-header-search-close\" class=\"fas fa-times search_box_close\"></i>
<div class=\"search_box_head_white\"></div>
<div class=\"search_box_head_blue\"></div>
<div class=\"search_box_ears\"><img src=\"{{ asset('assets/img/common/search_ears.svg', 'user_data') }}\" alt=\"宇宙グッズを探す\" /></div>
<div class=\"search_box_top\"></div>
<div class=\"search_drawer_box_inner\">
<p class=\"search_box_title\">キーワードで探す</p>
{{ render(path('block_search_product')) }}
<p class=\"search_box_title\">カテゴリで探す</p>
<div>
{% set Categories = repository('Eccube\\\\Entity\\\\Category').getList() %}
{% macro tree(Category) %}
{% from _self import tree %}
{# {% if Category.ProductCategories|length > 0 %} #}
{% if Category.ProductCategories|length > 0 and Category.id > 178 %}
{% if Category.children|length > 0 %}
{% if Category.parents|length > 0 %}
<p class=\"second_title category_id_{{ Category.id }}\"><span class=\"category_icon\"></span>{{ Category.name }}<span class=\"category_length\">{{ Category.ProductCategories|length}}</span></p>
<div class=\"category_bottom second_bottom\"></div>
<ul class=\"second_children category_id_{{ Category.id }}\">
<li>
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\" class=\"category_id_{{ Category.id }}\">
<span class=\"category_icon category_all\"></span>
すべての{{ Category.name }}<span class=\"category_length\">{{ Category.ProductCategories|length}}</span>
</a>
<div class=\"category_bottom third_bottom\"></div>
</li>
{% else %}
<p class=\"first_title category_id_{{ Category.id }}\"><span></span>{{ Category.name }}</p>
<div class=\"category_bottom\"></div>
<ul class=\"first_children category_id_{{ Category.id }}\">
<li>
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\" class=\"category_id_{{ Category.id }}\">
<span class=\"category_icon category_all\"></span>
すべての{{ Category.name }}<span class=\"category_length\">{{ Category.ProductCategories|length}}</span>
</a>
<div class=\"category_bottom second_bottom\"></div>
</li>
{% endif %}
{% for ChildCategory in Category.children %}
<li>
{{ tree(ChildCategory) }}
</li>
{% endfor %}
</ul>
{% else %}
<a href=\"{{ url('product_list') }}?category_id={{ Category.id }}\" class=\"category_id_{{ Category.id }}\">
<span class=\"category_icon\"></span>
{{ Category.name }}<span class=\"category_length\">{{ Category.ProductCategories|length}}</span>
</a>
{% if Category.parents|length > 1 %}
<div class=\"category_bottom third_bottom\"></div>
{% else %}
<div class=\"category_bottom second_bottom\"></div>
{% endif %}
{% endif %}
{% endif %}
{% endmacro %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
<div class=\"ec-headerCategoryArea\">
<div class=\"ec-itemNav\">
<ul class=\"ec-itemNav__nav\">
{% for Category in Categories %}
{% if Category.ProductCategories|length > 0 %}
<li>{{ tree(Category) }}</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
<div class=\"search_box_bottom\"><a href=\"{{ url('product_list') }}\">すべての宇宙グッズ</a></div>
</div>
</div>", "Block/drawer_search.twig", "/home/unibo-test/www/html/app/template/default/Block/drawer_search.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 12, "from" => 61, "for" => 65, "if" => 66, "macro" => 13);
static $filters = array("escape" => 5, "length" => 66);
static $functions = array("asset" => 5, "render" => 9, "path" => 9, "repository" => 12, "url" => 74);
try {
$this->sandbox->checkSecurity(
['set', 'from', 'for', 'if', 'macro'],
['escape', 'length'],
['asset', 'render', 'path', 'repository', 'url'],
$this->source
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}