<?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/common_item_list.twig */
class __TwigTemplate_946906929882d964efd571ce3ae35dd9 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/common_item_list.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/common_item_list.twig"));
// line 6
echo "<!-- アイテムリスト -->
";
// line 7
$context["Category"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "find", [0 => (isset($context["category_base"]) || array_key_exists("category_base", $context) ? $context["category_base"] : (function () { throw new RuntimeError('Variable "category_base" does not exist.', 7, $this->source); })())], "method", false, false, true, 7);
// line 8
$context["OrderbyObj"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Master\\ProductListOrderBy"), "find", [0 => "4"], "method", false, false, true, 8);
// line 9
$context["products"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Product"), "getQueryBuilderBySearchData", [0 => ["category_id" => // line 10
(isset($context["Category"]) || array_key_exists("Category", $context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.', 10, $this->source); })()), "orderby" => (isset($context["OrderbyObj"]) || array_key_exists("OrderbyObj", $context) ? $context["OrderbyObj"] : (function () { throw new RuntimeError('Variable "OrderbyObj" does not exist.', 10, $this->source); })())]], "method", false, false, true, 9), "setMaxResults", [0 => 100], "method", false, false, true, 10), "getQuery", [], "method", false, false, true, 11), "getResult", [], "method", false, false, true, 12);
// line 15
echo "
";
// line 16
if ((isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 16, $this->source); })())) {
// line 17
echo "<div class=\"ec-shelfRole ym-role\">
\t<div class=\"ec-secHeading\">
\t\t<span class=\"ec-secHeading__en\">PRODUCTS</span>
\t\t<span class=\"ec-secHeading__line\"></span>
\t\t<span class=\"ec-secHeading__ja\">商品一覧</span>
\t</div>
\t<ul class=\"ec-shelfGrid\">
\t ";
// line 24
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_slice($this->env, (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 24, $this->source); })()), 0, 8));
foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
// line 25
echo "\t <li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"";
// line 26
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["Product"], "id", [], "any", false, false, true, 26)]), "html", null, true);
echo "\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t";
// line 28
list($context["tag_lb"], $context["tag_lt"]) = ["", ""];
// line 29
echo "\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Product"], "Tags", [], "any", false, false, true, 29));
foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
// line 30
echo "\t\t\t\t\t\t";
if ((twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, true, 30) == 3)) {
// line 31
echo "\t\t\t\t\t\t\t";
ob_start();
echo "<span class=\"list_tag tag_pos_lb tag_style_";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, true, 31), 31, $this->source), "html", null, true);
echo "\"><span class=\"tag_inner\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["Tag"], 31, $this->source), "html", null, true);
echo "</span></span>";
$context["tag_lb"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 32
echo "\t\t\t\t\t\t";
} else {
// line 33
echo "\t\t\t\t\t\t\t";
ob_start();
echo "<span class=\"list_tag tag_pos_lt tag_style_";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Tag"], "id", [], "any", false, false, true, 33), 33, $this->source), "html", null, true);
echo "\"><span class=\"tag_inner\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["Tag"], 33, $this->source), "html", null, true);
echo "</span></span>";
$context["tag_lt"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 34
echo "\t\t\t\t\t\t";
}
// line 35
echo "\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 36
echo "\t\t\t\t\t";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["tag_lb"]) || array_key_exists("tag_lb", $context) ? $context["tag_lb"] : (function () { throw new RuntimeError('Variable "tag_lb" does not exist.', 36, $this->source); })()), 36, $this->source), "html", null, true);
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["tag_lt"]) || array_key_exists("tag_lt", $context) ? $context["tag_lt"] : (function () { throw new RuntimeError('Variable "tag_lt" does not exist.', 36, $this->source); })()), 36, $this->source), "html", null, true);
echo "
\t\t\t\t\t<img src=\"";
// line 37
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Customize\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "main_list_image", [], "any", false, false, true, 37), 37, $this->source)), "save_image"), "html", null, true);
echo "\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">";
// line 39
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "name", [], "any", false, false, true, 39), 39, $this->source), "html", null, true);
echo "</p>
\t\t\t\t<p class=\"ym-item__price\">";
// line 40
echo twig_escape_filter($this->env, $this->extensions['Customize\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Product"], "getPrice02IncTaxMax", [], "any", false, false, true, 40), 40, $this->source)), "html", null, true);
echo "</p>
\t\t\t</a>
\t\t</li>
\t ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 44
echo "\t ";
// line 118
echo "\t</ul>
\t<p class=\"ym-more ym-btn\"><a href=\"";
// line 119
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
echo "?category_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["category_base"]) || array_key_exists("category_base", $context) ? $context["category_base"] : (function () { throw new RuntimeError('Variable "category_base" does not exist.', 119, $this->source); })()), 119, $this->source), "html", null, true);
echo "\">もっと見る</a></p>
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "Block/common_item_list.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 151 => 119, 148 => 118, 146 => 44, 136 => 40, 132 => 39, 127 => 37, 121 => 36, 115 => 35, 112 => 34, 103 => 33, 100 => 32, 91 => 31, 88 => 30, 83 => 29, 81 => 28, 76 => 26, 73 => 25, 69 => 24, 60 => 17, 58 => 16, 55 => 15, 53 => 10, 52 => 9, 50 => 8, 48 => 7, 45 => 6,);
}
public function getSourceContext()
{
return new Source("{#
親カテゴリに基づく商品一覧を表示
setMaxResultsで取得したアイテムに対してカテゴリフィルタがかかる為、
ループ時に8件表示指定。
#}
<!-- アイテムリスト -->
{% set Category = repository(\"Eccube\\\\Entity\\\\Category\").find( category_base ) %}
{% set OrderbyObj = repository(\"Eccube\\\\Entity\\\\Master\\\\ProductListOrderBy\").find('4') %}
{% set products = repository(\"Eccube\\\\Entity\\\\Product\")
.getQueryBuilderBySearchData({'category_id':Category,'orderby':OrderbyObj})
.setMaxResults( 100 )
.getQuery()
.getResult()
%}
{% if products %}
<div class=\"ec-shelfRole ym-role\">
\t<div class=\"ec-secHeading\">
\t\t<span class=\"ec-secHeading__en\">PRODUCTS</span>
\t\t<span class=\"ec-secHeading__line\"></span>
\t\t<span class=\"ec-secHeading__ja\">商品一覧</span>
\t</div>
\t<ul class=\"ec-shelfGrid\">
\t {% for Product in products | slice( 0, 8 ) %}
\t <li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t{% set tag_lb,tag_lt = '','' %}
\t\t\t\t\t{% for Tag in Product.Tags %}
\t\t\t\t\t\t{% if Tag.id == 3 %}
\t\t\t\t\t\t\t{% set tag_lb %}<span class=\"list_tag tag_pos_lb tag_style_{{ Tag.id }}\"><span class=\"tag_inner\">{{ Tag }}</span></span>{% endset %}
\t\t\t\t\t\t{% else %}
\t\t\t\t\t\t\t{% set tag_lt %}<span class=\"list_tag tag_pos_lt tag_style_{{ Tag.id }}\"><span class=\"tag_inner\">{{ Tag }}</span></span>{% endset %}
\t\t\t\t\t\t{% endif %}
\t\t\t\t\t{% endfor %}
\t\t\t\t\t{{ tag_lb }}{{ tag_lt }}
\t\t\t\t\t<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">{{ Product.name }}</p>
\t\t\t\t<p class=\"ym-item__price\">{{ Product.getPrice02IncTaxMax|price }}</p>
\t\t\t</a>
\t\t</li>
\t {% endfor %}
\t {#
\t\t<li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_07.jpg\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">Mariaプルオーバーパーカー</p>
\t\t\t\t<p class=\"ym-item__price\">¥5,500(税込)</p>
\t\t\t</a>
\t\t</li>
\t\t<li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_08.jpg\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">Mariaドライポロシャツ</p>
\t\t\t\t<p class=\"ym-item__price\">¥3,850(税込)</p>
\t\t\t</a>
\t\t</li>
\t\t<li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_09.jpg\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">abonetアクティブカレントハット Mariaモデル</p>
\t\t\t\t<p class=\"ym-item__price\">¥12,100(税込)</p>
\t\t\t</a>
\t\t</li>
\t\t<li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_10.jpg\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">Maria×ST(ストリームトレイル) ロックショアバッグ</p>
\t\t\t\t<p class=\"ym-item__price\">¥18,700(税込)</p>
\t\t\t</a>
\t\t</li>
\t\t<li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_11.jpg\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">Mariaカッティングステッカー</p>
\t\t\t\t<p class=\"ym-item__price\">¥1,650(税込)</p>
\t\t\t</a>
\t\t</li>
\t\t<li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_07.jpg\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">Mariaプルオーバーパーカー</p>
\t\t\t\t<p class=\"ym-item__price\">¥5,500(税込)</p>
\t\t\t</a>
\t\t</li>
\t\t<li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_08.jpg\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">Mariaドライポロシャツ</p>
\t\t\t\t<p class=\"ym-item__price\">¥3,850(税込)</p>
\t\t\t</a>
\t\t</li>
\t\t<li class=\"ec-shelfGrid__item ym-item\">
\t\t\t<a href=\"\">
\t\t\t\t<p class=\"ym-item__image\">
\t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_09.jpg\">
\t\t\t\t</p>
\t\t\t\t<p class=\"ym-item__name\">abonetアクティブカレントハット Mariaモデル</p>
\t\t\t\t<p class=\"ym-item__price\">¥12,100(税込)</p>
\t\t\t</a>
\t\t</li>
\t\t#}
\t</ul>
\t<p class=\"ym-more ym-btn\"><a href=\"{{ url('product_list') }}?category_id={{ category_base }}\">もっと見る</a></p>
</div>
{% endif %}", "Block/common_item_list.twig", "/home/dober/testman.biz/public_html/yamaria-ec-demo/app/template/yamaria/Block/common_item_list.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 7, "if" => 16, "for" => 24);
static $filters = array("slice" => 24, "escape" => 26, "no_image_product" => 37, "price" => 40);
static $functions = array("repository" => 7, "url" => 26, "asset" => 37);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for'],
['slice', 'escape', 'no_image_product', 'price'],
['repository', 'url', 'asset']
);
} 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;
}
}
}