<?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/product_sidemenu.twig */
class __TwigTemplate_0f1ad48a0b12f299d5c0ec4deaa83f393db61ca299126698e24ce6e3eda80cff 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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/product_sidemenu.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/product_sidemenu.twig"));
// line 1
$context["break"] = false;
// line 2
$context["cat"] = "";
// line 3
echo "
";
// line 4
if ( !(null === (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 4, $this->source); })()))) {
// line 5
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 5, $this->source); })()), "ProductCategories", [], "any", false, false, false, 5))) {
// line 6
echo "
";
// line 7
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Product"]) || array_key_exists("Product", $context) ? $context["Product"] : (function () { throw new RuntimeError('Variable "Product" does not exist.', 7, $this->source); })()), "ProductCategories", [], "any", false, false, false, 7));
foreach ($context['_seq'] as $context["_key"] => $context["ProductCategory"]) {
if ( !(isset($context["break"]) || array_key_exists("break", $context) ? $context["break"] : (function () { throw new RuntimeError('Variable "break" does not exist.', 7, $this->source); })())) {
// line 8
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 8), "name", [], "any", false, false, false, 8) == "ヴァイスシュヴァルツ")) {
// line 9
echo " ";
$context["cat"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 9), "name", [], "any", false, false, false, 9);
// line 10
echo " ";
$context["break"] = true;
// line 11
echo " ";
} elseif ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 11), "name", [], "any", false, false, false, 11) == "ポケモン")) {
// line 12
echo " ";
$context["cat"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["ProductCategory"], "Category", [], "any", false, false, false, 12), "name", [], "any", false, false, false, 12);
// line 13
echo " ";
$context["break"] = true;
// line 14
echo " ";
}
// line 15
echo " ";
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ProductCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo "
";
}
}
// line 19
echo "
";
// line 20
if (((isset($context["cat"]) || array_key_exists("cat", $context) ? $context["cat"] : (function () { throw new RuntimeError('Variable "cat" does not exist.', 20, $this->source); })()) == "ヴァイスシュヴァルツ")) {
// line 21
echo " <div class=\"title-box\">
<a href=\"";
// line 22
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=8\" class=\"titlebtn\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/html/user_data/assets/img/weis.png"), "html", null, true);
echo "\" alt=\"\"></a>
<div class=\"sbbtn-box\">
<div class=\"graybtn\">
<div>
<a href=\"";
// line 26
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=8\">買う</a>
</div>
</div>
<div class=\"buybtn\">
<div>
<a href=\"";
// line 32
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=218\">売る</a>
</div>
</div>
</div>
</div>
";
// line 38
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_side_serch_buy"));
echo "
";
// line 41
$context["Categories"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "findBy", [0 => ["Parent" => 9]], "method", false, false, false, 41);
// line 42
echo "
";
// line 46
echo " ";
$macros["__internal_parse_0"] = $this->macros["__internal_parse_0"] = $this;
// line 47
echo "
<div class=\"side-cat1\">
<div class=\"side-cat-smallbox\">
<a href=\"";
// line 52
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=221\">シュヴァルツサイド</a>
<ul>
";
// line 54
$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.', 54, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 55
echo " <li>";
echo twig_call_macro($macros["__internal_parse_0"], "macro_tree", [$context["Category"]], 55, $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 57
echo " </ul>
</div>
</div>
";
// line 62
$context["Categories"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "findBy", [0 => ["Parent" => 10]], "method", false, false, false, 62);
// line 63
echo "
";
// line 65
echo " ";
$macros["__internal_parse_1"] = $this->macros["__internal_parse_1"] = $this;
// line 66
echo "
<div class=\"side-cat1\">
<div class=\"side-cat-smallbox\">
<a href=\"";
// line 71
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=220\">ヴァイスサイド</a>
<ul>
";
// line 73
$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.', 73, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 74
echo " <li>";
echo twig_call_macro($macros["__internal_parse_1"], "macro_tree", [$context["Category"]], 74, $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 76
echo " </ul>
</div>
</div>
";
} elseif (( // line 80
(isset($context["cat"]) || array_key_exists("cat", $context) ? $context["cat"] : (function () { throw new RuntimeError('Variable "cat" does not exist.', 80, $this->source); })()) == "ポケモン")) {
// line 81
echo " <div class=\"title-box\">
<a href=\"";
// line 82
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=7\" class=\"titlebtn\"><img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/html/user_data/assets/img/poke.png"), "html", null, true);
echo "\" alt=\"\"></a>
<div class=\"sbbtn-box\">
<div class=\"salebtn\">
<div>
<a href=\"";
// line 86
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=7\">買う</a>
</div>
</div>
<div class=\"graybtn\">
<div>
<a href=\"";
// line 92
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=219\">売る</a>
</div>
</div>
</div>
</div>
";
// line 99
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("block_side_serch_buy"));
echo "
";
// line 100
$context["Categories"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "findBy", [0 => ["Parent" => 7]], "method", false, false, false, 100);
// line 101
echo "
";
// line 104
echo " ";
$macros["__internal_parse_2"] = $this->macros["__internal_parse_2"] = $this;
// line 105
echo "
<div class=\"side-cat1\">
<div class=\"side-cat-smallbox\">
<a href=\"";
// line 108
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "products/list?category_id=219\">ポケモン</a>
<ul>
";
// line 110
$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.', 110, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Category"]) {
// line 111
echo " <li>";
echo twig_call_macro($macros["__internal_parse_2"], "macro_tree", [$context["Category"]], 111, $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 113
echo " </ul>
</div>
</div>
";
}
// line 120
echo "
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 121
public function macro_tree($__Category__ = null, ...$__varargs__)
{
$macros = $this->macros;
$context = $this->env->mergeGlobals([
"Category" => $__Category__,
"varargs" => $__varargs__,
]);
$blocks = [];
ob_start();
try {
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "tree"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro", "tree"));
// line 122
echo " ";
$macros["__internal_parse_3"] = $this;
// line 123
echo "
<a href=\"";
// line 124
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.', 124, $this->source); })()), "id", [], "any", false, false, false, 124), "html", null, true);
echo "\">
";
// line 125
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.', 125, $this->source); })()), "name", [], "any", false, false, false, 125), "html", null, true);
echo "
</a>
";
// line 127
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.', 127, $this->source); })()), "children", [], "any", false, false, false, 127)) > 0)) {
// line 128
echo " <ul>
";
// line 129
$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.', 129, $this->source); })()), "children", [], "any", false, false, false, 129));
foreach ($context['_seq'] as $context["_key"] => $context["ChildCategory"]) {
// line 130
echo " <li>
";
// line 131
echo twig_call_macro($macros["__internal_parse_3"], "macro_tree", [$context["ChildCategory"]], 131, $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 134
echo " </ul>
";
}
// line 136
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
return ('' === $tmp = ob_get_contents()) ? '' : new Markup($tmp, $this->env->getCharset());
} finally {
ob_end_clean();
}
}
public function getTemplateName()
{
return "Block/product_sidemenu.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 367 => 136, 363 => 134, 354 => 131, 351 => 130, 347 => 129, 344 => 128, 342 => 127, 337 => 125, 331 => 124, 328 => 123, 325 => 122, 306 => 121, 295 => 120, 286 => 113, 277 => 111, 273 => 110, 268 => 108, 263 => 105, 260 => 104, 256 => 101, 254 => 100, 250 => 99, 240 => 92, 231 => 86, 222 => 82, 219 => 81, 217 => 80, 211 => 76, 202 => 74, 198 => 73, 193 => 71, 186 => 66, 183 => 65, 180 => 63, 178 => 62, 171 => 57, 162 => 55, 158 => 54, 153 => 52, 146 => 47, 143 => 46, 138 => 42, 136 => 41, 130 => 38, 121 => 32, 112 => 26, 103 => 22, 100 => 21, 98 => 20, 95 => 19, 90 => 16, 83 => 15, 80 => 14, 77 => 13, 74 => 12, 71 => 11, 68 => 10, 65 => 9, 62 => 8, 57 => 7, 54 => 6, 52 => 5, 50 => 4, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% set break = false %}
{% set cat = \"\" %}
{% if Product is not null %}
{% if Product.ProductCategories is not empty %}
{% for ProductCategory in Product.ProductCategories if not break %}
{% if ProductCategory.Category.name == \"ヴァイスシュヴァルツ\" %}
{% set cat = ProductCategory.Category.name %}
{% set break = true %}
{% elseif ProductCategory.Category.name == \"ポケモン\" %}
{% set cat = ProductCategory.Category.name %}
{% set break = true %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% if cat == \"ヴァイスシュヴァルツ\" %}
<div class=\"title-box\">
<a href=\"{{url('homepage')}}products/list?category_id=8\" class=\"titlebtn\"><img src=\"{{ asset('/html/user_data/assets/img/weis.png') }}\" alt=\"\"></a>
<div class=\"sbbtn-box\">
<div class=\"graybtn\">
<div>
<a href=\"{{url('homepage')}}products/list?category_id=8\">買う</a>
</div>
</div>
<div class=\"buybtn\">
<div>
<a href=\"{{url('homepage')}}products/list?category_id=218\">売る</a>
</div>
</div>
</div>
</div>
{{ render(path('block_side_serch_buy')) }}
{% set Categories = repository('Eccube\\\\Entity\\\\Category').findBy({'Parent' : 9}) %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
<div class=\"side-cat1\">
<div class=\"side-cat-smallbox\">
<a href=\"{{url('homepage')}}products/list?category_id=221\">シュヴァルツサイド</a>
<ul>
{% for Category in Categories %}
<li>{{ tree(Category) }}</li>
{% endfor %}
</ul>
</div>
</div>
{% set Categories = repository('Eccube\\\\Entity\\\\Category').findBy({'Parent' : 10}) %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
<div class=\"side-cat1\">
<div class=\"side-cat-smallbox\">
<a href=\"{{url('homepage')}}products/list?category_id=220\">ヴァイスサイド</a>
<ul>
{% for Category in Categories %}
<li>{{ tree(Category) }}</li>
{% endfor %}
</ul>
</div>
</div>
{% elseif cat == \"ポケモン\" %}
<div class=\"title-box\">
<a href=\"{{url('homepage')}}products/list?category_id=7\" class=\"titlebtn\"><img src=\"{{ asset('/html/user_data/assets/img/poke.png') }}\" alt=\"\"></a>
<div class=\"sbbtn-box\">
<div class=\"salebtn\">
<div>
<a href=\"{{url('homepage')}}products/list?category_id=7\">買う</a>
</div>
</div>
<div class=\"graybtn\">
<div>
<a href=\"{{url('homepage')}}products/list?category_id=219\">売る</a>
</div>
</div>
</div>
</div>
{{ render(path('block_side_serch_buy')) }}
{% set Categories = repository('Eccube\\\\Entity\\\\Category').findBy({'Parent' : 7}) %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
<div class=\"side-cat1\">
<div class=\"side-cat-smallbox\">
<a href=\"{{url('homepage')}}products/list?category_id=219\">ポケモン</a>
<ul>
{% for Category in Categories %}
<li>{{ tree(Category) }}</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% 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 %}", "Block/product_sidemenu.twig", "/home/northserver/tcg-mana.com/public_html/app/template/default/Block/product_sidemenu.twig");
}
}