var/cache/dev/twig/18/1813b2222a4463db6c9f632e6575d5ee.php line 85

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Block/common_item_list.twig */
  14. class __TwigTemplate_946906929882d964efd571ce3ae35dd9 extends \Eccube\Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/common_item_list.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/common_item_list.twig"));
  35.         // line 6
  36.         echo "<!-- アイテムリスト -->
  37. ";
  38.         // line 7
  39.         $context["Category"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Category"), "find", [=> (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"falsefalsetrue7);
  40.         // line 8
  41.         $context["OrderbyObj"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Master\\ProductListOrderBy"), "find", [=> "4"], "method"falsefalsetrue8);
  42.         // line 9
  43.         $context["products"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\Product"), "getQueryBuilderBySearchData", [=> ["category_id" =>         // line 10
  44. (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"falsefalsetrue9), "setMaxResults", [=> 100], "method"falsefalsetrue10), "getQuery", [], "method"falsefalsetrue11), "getResult", [], "method"falsefalsetrue12);
  45.         // line 15
  46.         echo "
  47. ";
  48.         // line 16
  49.         if ((isset($context["products"]) || array_key_exists("products"$context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.'16$this->source); })())) {
  50.             // line 17
  51.             echo "<div class=\"ec-shelfRole ym-role\">
  52. \t<div class=\"ec-secHeading\">
  53. \t\t<span class=\"ec-secHeading__en\">PRODUCTS</span>
  54. \t\t<span class=\"ec-secHeading__line\"></span>
  55. \t\t<span class=\"ec-secHeading__ja\">商品一覧</span>
  56. \t</div>
  57. \t<ul class=\"ec-shelfGrid\">
  58. \t    ";
  59.             // line 24
  60.             $context['_parent'] = $context;
  61.             $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); })()), 08));
  62.             foreach ($context['_seq'] as $context["_key"] => $context["Product"]) {
  63.                 // line 25
  64.                 echo "\t    <li class=\"ec-shelfGrid__item ym-item\">
  65. \t\t\t<a href=\"";
  66.                 // line 26
  67.                 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"falsefalsetrue26)]), "html"nulltrue);
  68.                 echo "\">
  69. \t\t\t\t<p class=\"ym-item__image\">
  70. \t\t\t\t\t";
  71.                 // line 28
  72.                 list($context["tag_lb"], $context["tag_lt"]) =                 [""""];
  73.                 // line 29
  74.                 echo "\t\t\t\t\t";
  75.                 $context['_parent'] = $context;
  76.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["Product"], "Tags", [], "any"falsefalsetrue29));
  77.                 foreach ($context['_seq'] as $context["_key"] => $context["Tag"]) {
  78.                     // line 30
  79.                     echo "\t\t\t\t\t\t";
  80.                     if ((twig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsetrue30) == 3)) {
  81.                         // line 31
  82.                         echo "\t\t\t\t\t\t\t";
  83.                         ob_start();
  84.                         echo "<span class=\"list_tag tag_pos_lb tag_style_";
  85.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsetrue31), 31$this->source), "html"nulltrue);
  86.                         echo "\"><span class=\"tag_inner\">";
  87.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed($context["Tag"], 31$this->source), "html"nulltrue);
  88.                         echo "</span></span>";
  89.                         $context["tag_lb"] = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  90.                         // line 32
  91.                         echo "\t\t\t\t\t\t";
  92.                     } else {
  93.                         // line 33
  94.                         echo "\t\t\t\t\t\t\t";
  95.                         ob_start();
  96.                         echo "<span class=\"list_tag tag_pos_lt tag_style_";
  97.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Tag"], "id", [], "any"falsefalsetrue33), 33$this->source), "html"nulltrue);
  98.                         echo "\"><span class=\"tag_inner\">";
  99.                         echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed($context["Tag"], 33$this->source), "html"nulltrue);
  100.                         echo "</span></span>";
  101.                         $context["tag_lt"] = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  102.                         // line 34
  103.                         echo "\t\t\t\t\t\t";
  104.                     }
  105.                     // line 35
  106.                     echo "\t\t\t\t\t";
  107.                 }
  108.                 $_parent $context['_parent'];
  109.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Tag'], $context['_parent'], $context['loop']);
  110.                 $context array_intersect_key($context$_parent) + $_parent;
  111.                 // line 36
  112.                 echo "\t\t\t\t\t";
  113.                 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"nulltrue);
  114.                 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"nulltrue);
  115.                 echo "
  116. \t\t\t\t\t<img src=\"";
  117.                 // line 37
  118.                 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"falsefalsetrue37), 37$this->source)), "save_image"), "html"nulltrue);
  119.                 echo "\">
  120. \t\t\t\t</p>
  121. \t\t\t\t<p class=\"ym-item__name\">";
  122.                 // line 39
  123.                 echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["Product"], "name", [], "any"falsefalsetrue39), 39$this->source), "html"nulltrue);
  124.                 echo "</p>
  125. \t\t\t\t<p class=\"ym-item__price\">";
  126.                 // line 40
  127.                 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"falsefalsetrue40), 40$this->source)), "html"nulltrue);
  128.                 echo "</p>
  129. \t\t\t</a>
  130. \t\t</li>
  131. \t    ";
  132.             }
  133.             $_parent $context['_parent'];
  134.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Product'], $context['_parent'], $context['loop']);
  135.             $context array_intersect_key($context$_parent) + $_parent;
  136.             // line 44
  137.             echo "\t    ";
  138.             // line 118
  139.             echo "\t</ul>
  140. \t<p class=\"ym-more ym-btn\"><a href=\"";
  141.             // line 119
  142.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_list");
  143.             echo "?category_id=";
  144.             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"nulltrue);
  145.             echo "\">もっと見る</a></p>
  146. </div>
  147. ";
  148.         }
  149.         
  150.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  151.         
  152.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  153.     }
  154.     public function getTemplateName()
  155.     {
  156.         return "Block/common_item_list.twig";
  157.     }
  158.     public function isTraitable()
  159.     {
  160.         return false;
  161.     }
  162.     public function getDebugInfo()
  163.     {
  164.         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,);
  165.     }
  166.     public function getSourceContext()
  167.     {
  168.         return new Source("{#
  169. 親カテゴリに基づく商品一覧を表示
  170. setMaxResultsで取得したアイテムに対してカテゴリフィルタがかかる為、
  171. ループ時に8件表示指定。
  172. #}
  173. <!-- アイテムリスト -->
  174. {% set Category = repository(\"Eccube\\\\Entity\\\\Category\").find( category_base ) %}
  175. {% set OrderbyObj = repository(\"Eccube\\\\Entity\\\\Master\\\\ProductListOrderBy\").find('4') %}
  176. {% set products = repository(\"Eccube\\\\Entity\\\\Product\")
  177.     .getQueryBuilderBySearchData({'category_id':Category,'orderby':OrderbyObj})
  178.     .setMaxResults( 100 )
  179.     .getQuery()
  180.     .getResult() 
  181. %}
  182. {% if products %}
  183. <div class=\"ec-shelfRole ym-role\">
  184. \t<div class=\"ec-secHeading\">
  185. \t\t<span class=\"ec-secHeading__en\">PRODUCTS</span>
  186. \t\t<span class=\"ec-secHeading__line\"></span>
  187. \t\t<span class=\"ec-secHeading__ja\">商品一覧</span>
  188. \t</div>
  189. \t<ul class=\"ec-shelfGrid\">
  190. \t    {% for Product in products | slice( 0, 8 ) %}
  191. \t    <li class=\"ec-shelfGrid__item ym-item\">
  192. \t\t\t<a href=\"{{ url('product_detail', {'id': Product.id}) }}\">
  193. \t\t\t\t<p class=\"ym-item__image\">
  194. \t\t\t\t\t{% set tag_lb,tag_lt = '','' %}
  195. \t\t\t\t\t{% for Tag in Product.Tags %}
  196. \t\t\t\t\t\t{% if Tag.id == 3 %}
  197. \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 %}
  198. \t\t\t\t\t\t{% else %}
  199. \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 %}
  200. \t\t\t\t\t\t{% endif %}
  201. \t\t\t\t\t{% endfor %}
  202. \t\t\t\t\t{{ tag_lb }}{{ tag_lt }}
  203. \t\t\t\t\t<img src=\"{{ asset(Product.main_list_image|no_image_product, 'save_image') }}\">
  204. \t\t\t\t</p>
  205. \t\t\t\t<p class=\"ym-item__name\">{{ Product.name }}</p>
  206. \t\t\t\t<p class=\"ym-item__price\">{{ Product.getPrice02IncTaxMax|price }}</p>
  207. \t\t\t</a>
  208. \t\t</li>
  209. \t    {% endfor %}
  210. \t    {#
  211. \t\t<li class=\"ec-shelfGrid__item ym-item\">
  212. \t\t\t<a href=\"\">
  213. \t\t\t\t<p class=\"ym-item__image\">
  214. \t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_07.jpg\">
  215. \t\t\t\t</p>
  216. \t\t\t\t<p class=\"ym-item__name\">Mariaプルオーバーパーカー</p>
  217. \t\t\t\t<p class=\"ym-item__price\">¥5,500(税込)</p>
  218. \t\t\t</a>
  219. \t\t</li>
  220. \t\t<li class=\"ec-shelfGrid__item ym-item\">
  221. \t\t\t<a href=\"\">
  222. \t\t\t\t<p class=\"ym-item__image\">
  223. \t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_08.jpg\">
  224. \t\t\t\t</p>
  225. \t\t\t\t<p class=\"ym-item__name\">Mariaドライポロシャツ</p>
  226. \t\t\t\t<p class=\"ym-item__price\">¥3,850(税込)</p>
  227. \t\t\t</a>
  228. \t\t</li>
  229. \t\t<li class=\"ec-shelfGrid__item ym-item\">
  230. \t\t\t<a href=\"\">
  231. \t\t\t\t<p class=\"ym-item__image\">
  232. \t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_09.jpg\">
  233. \t\t\t\t</p>
  234. \t\t\t\t<p class=\"ym-item__name\">abonetアクティブカレントハット Mariaモデル</p>
  235. \t\t\t\t<p class=\"ym-item__price\">¥12,100(税込)</p>
  236. \t\t\t</a>
  237. \t\t</li>
  238. \t\t<li class=\"ec-shelfGrid__item ym-item\">
  239. \t\t\t<a href=\"\">
  240. \t\t\t\t<p class=\"ym-item__image\">
  241. \t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_10.jpg\">
  242. \t\t\t\t</p>
  243. \t\t\t\t<p class=\"ym-item__name\">Maria×ST(ストリームトレイル) ロックショアバッグ</p>
  244. \t\t\t\t<p class=\"ym-item__price\">¥18,700(税込)</p>
  245. \t\t\t</a>
  246. \t\t</li>
  247. \t\t<li class=\"ec-shelfGrid__item ym-item\">
  248. \t\t\t<a href=\"\">
  249. \t\t\t\t<p class=\"ym-item__image\">
  250. \t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_11.jpg\">
  251. \t\t\t\t</p>
  252. \t\t\t\t<p class=\"ym-item__name\">Mariaカッティングステッカー</p>
  253. \t\t\t\t<p class=\"ym-item__price\">¥1,650(税込)</p>
  254. \t\t\t</a>
  255. \t\t</li>
  256. \t\t<li class=\"ec-shelfGrid__item ym-item\">
  257. \t\t\t<a href=\"\">
  258. \t\t\t\t<p class=\"ym-item__image\">
  259. \t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_07.jpg\">
  260. \t\t\t\t</p>
  261. \t\t\t\t<p class=\"ym-item__name\">Mariaプルオーバーパーカー</p>
  262. \t\t\t\t<p class=\"ym-item__price\">¥5,500(税込)</p>
  263. \t\t\t</a>
  264. \t\t</li>
  265. \t\t<li class=\"ec-shelfGrid__item ym-item\">
  266. \t\t\t<a href=\"\">
  267. \t\t\t\t<p class=\"ym-item__image\">
  268. \t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_08.jpg\">
  269. \t\t\t\t</p>
  270. \t\t\t\t<p class=\"ym-item__name\">Mariaドライポロシャツ</p>
  271. \t\t\t\t<p class=\"ym-item__price\">¥3,850(税込)</p>
  272. \t\t\t</a>
  273. \t\t</li>
  274. \t\t<li class=\"ec-shelfGrid__item ym-item\">
  275. \t\t\t<a href=\"\">
  276. \t\t\t\t<p class=\"ym-item__image\">
  277. \t\t\t\t\t<img src=\"/html/user_data/assets/img/dummy/img_dummy_09.jpg\">
  278. \t\t\t\t</p>
  279. \t\t\t\t<p class=\"ym-item__name\">abonetアクティブカレントハット Mariaモデル</p>
  280. \t\t\t\t<p class=\"ym-item__price\">¥12,100(税込)</p>
  281. \t\t\t</a>
  282. \t\t</li>
  283. \t\t#}
  284. \t</ul>
  285. \t<p class=\"ym-more ym-btn\"><a href=\"{{ url('product_list') }}?category_id={{ category_base }}\">もっと見る</a></p>
  286. </div>
  287. {% endif %}""Block/common_item_list.twig""/home/dober/testman.biz/public_html/yamaria-ec-demo/app/template/yamaria/Block/common_item_list.twig");
  288.     }
  289.     
  290.     public function checkSecurity()
  291.     {
  292.         static $tags = array("set" => 7"if" => 16"for" => 24);
  293.         static $filters = array("slice" => 24"escape" => 26"no_image_product" => 37"price" => 40);
  294.         static $functions = array("repository" => 7"url" => 26"asset" => 37);
  295.         try {
  296.             $this->sandbox->checkSecurity(
  297.                 ['set''if''for'],
  298.                 ['slice''escape''no_image_product''price'],
  299.                 ['repository''url''asset']
  300.             );
  301.         } catch (SecurityError $e) {
  302.             $e->setSourceContext($this->source);
  303.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  304.                 $e->setTemplateLine($tags[$e->getTagName()]);
  305.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  306.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  307.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  308.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  309.             }
  310.             throw $e;
  311.         }
  312.     }
  313. }