<?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;
/* @user_data/brand.twig */
class __TwigTemplate_35b11ca06b76a5fcd7039abe39976572c96f0541feaafc857f31a57794d6f22e extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'main' => [$this, 'block_main'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "default_frame.twig";
}
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", "@user_data/brand.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@user_data/brand.twig"));
$this->parent = $this->loadTemplate("default_frame.twig", "@user_data/brand.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_main($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(), "block", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 4
echo "
";
// line 7
echo "
";
// line 8
$context["parentId"] = 34;
// line 9
$context["ParentCategory"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "find", [0 => (isset($context["parentId"]) || array_key_exists("parentId", $context) ? $context["parentId"] : (function () { throw new RuntimeError('Variable "parentId" does not exist.', 9, $this->source); })())], "method", false, false, false, 9);
// line 10
$context["childCategories"] = twig_sort_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["ParentCategory"]) || array_key_exists("ParentCategory", $context) ? $context["ParentCategory"] : (function () { throw new RuntimeError('Variable "ParentCategory" does not exist.', 10, $this->source); })()), "children", [], "any", false, false, false, 10), function ($__a__, $__b__) use ($context, $macros) { $context["a"] = $__a__; $context["b"] = $__b__; return (twig_get_attribute($this->env, $this->source, (isset($context["a"]) || array_key_exists("a", $context) ? $context["a"] : (function () { throw new RuntimeError('Variable "a" does not exist.', 10, $this->source); })()), "sortNo", [], "any", false, false, false, 10) <=> twig_get_attribute($this->env, $this->source, (isset($context["b"]) || array_key_exists("b", $context) ? $context["b"] : (function () { throw new RuntimeError('Variable "b" does not exist.', 10, $this->source); })()), "sortNo", [], "any", false, false, false, 10)); });
// line 11
echo "
Brand
ブランドから探す
<ul>
";
// line 15
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["childCategories"]) || array_key_exists("childCategories", $context) ? $context["childCategories"] : (function () { throw new RuntimeError('Variable "childCategories" does not exist.', 15, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["childCategory"]) {
// line 16
echo " <li>
<a href=\"";
// line 17
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?brand_id=";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["childCategory"], "id", [], "any", false, false, false, 17), "html", null, true);
echo "\">
";
// line 18
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["childCategory"], "name", [], "any", false, false, false, 18), "html", null, true);
echo "
</a>
</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 22
echo "</ul>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@user_data/brand.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 110 => 22, 100 => 18, 94 => 17, 91 => 16, 87 => 15, 81 => 11, 79 => 10, 77 => 9, 75 => 8, 72 => 7, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'default_frame.twig' %}
{% block main %}
{# ブランド[カテゴリID:34]の子カテゴリ一覧を表示 #}
{% set parentId = 34 %}
{% set ParentCategory = repository('Eccube\\\\Entity\\\\Category').find(parentId) %}
{% set childCategories = ParentCategory.children|sort((a, b) => a.sortNo <=> b.sortNo) %}
Brand
ブランドから探す
<ul>
{% for childCategory in childCategories %}
<li>
<a href=\"{{ url('product_list') }}?brand_id={{ childCategory.id }}\">
{{ childCategory.name }}
</a>
</li>
{% endfor %}
</ul>
{% endblock %}", "@user_data/brand.twig", "/home/xs626321/ikus.furniture/public_html/dev/app/template/user_data/brand.twig");
}
}