var/cache/dev/twig/70/705bc15773583f3c5902b8ebb831a4b8.php line 81

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/current_weekly_recommend_product.twig */
  14. class __TwigTemplate_e7a30c23925eaa1ac089ab5aedc05142 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/current_weekly_recommend_product.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/current_weekly_recommend_product.twig"));
  35.         // line 1
  36.         $context["recommend_products"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Plugin\\Recommend42\\Entity\\RecommendProduct"), "getRecommendProduct", [], "any"falsefalsetrue1);
  37.         // line 2
  38.         echo "<!-- ▼item_list▼ -->
  39. <div class=\"block_outer\">
  40. <div class=\"ec-shelfRole current-month__recommendation\" id=\"ranking_area\">
  41.     <h2 class=\"illust-title\"><img src=\"";
  42.         // line 5
  43.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/icon/icon_book_green.png""user_data"), "html"nulltrue);
  44.         echo "\" alt=\"今週のオススメ\" class=\"aligncenter\" />今週のおすすめ</h2>
  45.     <div class=\"block_body\">
  46.     <ul class=\"ec-shelfGrid flex\">
  47.         ";
  48.         // line 8
  49.         $context['_parent'] = $context;
  50.         $context['_seq'] = twig_ensure_traversable((isset($context["recommend_products"]) || array_key_exists("recommend_products"$context) ? $context["recommend_products"] : (function () { throw new RuntimeError('Variable "recommend_products" does not exist.'8$this->source); })()));
  51.         $context['loop'] = [
  52.           'parent' => $context['_parent'],
  53.           'index0' => 0,
  54.           'index'  => 1,
  55.           'first'  => true,
  56.         ];
  57.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  58.             $length count($context['_seq']);
  59.             $context['loop']['revindex0'] = $length 1;
  60.             $context['loop']['revindex'] = $length;
  61.             $context['loop']['length'] = $length;
  62.             $context['loop']['last'] = === $length;
  63.         }
  64.         foreach ($context['_seq'] as $context["_key"] => $context["RecommendProducts"]) {
  65.             // line 9
  66.             echo "            ";
  67.             // line 10
  68.             echo "            ";
  69.             $context["newTag"] = false;
  70.             // line 11
  71.             echo "                ";
  72.             if ( !(null === twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue11), "Tags", [], "any"falsefalsetrue11))) {
  73.                 // line 12
  74.                 echo "                    ";
  75.                 $context['_parent'] = $context;
  76.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue12), "Tags", [], "any"falsefalsetrue12));
  77.                 foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
  78.                     // line 13
  79.                     echo "                    ";
  80.                     if ((twig_get_attribute($this->env$this->source$context["tag"], "id", [], "any"falsefalsetrue13) == 1)) {
  81.                         // line 14
  82.                         echo "                        ";
  83.                         $context["newTag"] = true;
  84.                         // line 15
  85.                         echo "                    ";
  86.                     }
  87.                     // line 16
  88.                     echo "                ";
  89.                 }
  90.                 $_parent $context['_parent'];
  91.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
  92.                 $context array_intersect_key($context$_parent) + $_parent;
  93.                 // line 17
  94.                 echo "            ";
  95.             }
  96.             // line 18
  97.             echo "            <li class=\"ec-shelfGrid__item rank-item flex";
  98.             if ((isset($context["newTag"]) || array_key_exists("newTag"$context) ? $context["newTag"] : (function () { throw new RuntimeError('Variable "newTag" does not exist.'18$this->source); })())) {
  99.                 echo " newtag";
  100.             }
  101.             echo "\" id=\"rank";
  102.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsetrue18), 18$this->source), "html"nulltrue);
  103.             echo "\">
  104.                 <a href=\"";
  105.             // line 19
  106.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue19), "id", [], "any"falsefalsetrue19)]), "html"nulltrue);
  107.             echo "\">
  108.                     ";
  109.             // line 21
  110.             echo "                    <div class=\"productImage\"><img  class=\"rankpicture\" src=\"";
  111.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue21), "mainFileName", [], "any"falsefalsetrue21), 21$this->source)), "save_image"), "html"nulltrue);
  112.             echo "\"></div>
  113.                     ";
  114.             // line 23
  115.             echo "                    <div class=\"productContents\">
  116.                         <p class=\"product-subname\">";
  117.             // line 24
  118.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue24), "SubNameUp", [], "any"falsefalsetrue24), 24$this->source), "html"nulltrue);
  119.             echo "</p>
  120.                         <h3>";
  121.             // line 25
  122.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue25), "name", [], "any"falsefalsetrue25), 25$this->source), "html"nulltrue);
  123.             echo "</h3>
  124.                         <p class=\"product-subname\">";
  125.             // line 26
  126.             echo twig_escape_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue26), "SubNameDown", [], "any"falsefalsetrue26), 26$this->source), "html"nulltrue);
  127.             echo "</p>
  128.                         ";
  129.             // line 27
  130.             if ((twig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsetrue27) == 1)) {
  131.                 // line 28
  132.                 echo "\t\t\t\t\t\t<p class=\"productPrice\">定価:
  133.                             <span class=\"sale_price\">
  134.                                 ";
  135.                 // line 30
  136.                 if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue30), "hasProductClass", [], "any"falsefalsetrue30)) {
  137.                     // line 31
  138.                     echo "                                    ";
  139.                     if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue31), "getPrice02Min", [], "any"falsefalsetrue31) == twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue31), "getPrice02Max", [], "any"falsefalsetrue31))) {
  140.                         // line 32
  141.                         echo "                                        ";
  142.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue32), "getPrice02IncTaxMin", [], "any"falsefalsetrue32), 32$this->source)), "html"nulltrue);
  143.                         echo "円
  144.                                     ";
  145.                     } else {
  146.                         // line 34
  147.                         echo "                                        ";
  148.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue34), "getPrice02IncTaxMin", [], "any"falsefalsetrue34), 34$this->source)), "html"nulltrue);
  149.                         echo "円 ~ ";
  150.                         echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue34), "getPrice02IncTaxMax", [], "any"falsefalsetrue34), 34$this->source)), "html"nulltrue);
  151.                         echo "円
  152.                                     ";
  153.                     }
  154.                     // line 36
  155.                     echo "                                ";
  156.                 } else {
  157.                     // line 37
  158.                     echo "                                    ";
  159.                     echo twig_escape_filter($this->envtwig_number_format_filter($this->env$this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["RecommendProducts"], "Product", [], "any"falsefalsetrue37), "getPrice02IncTaxMin", [], "any"falsefalsetrue37), 37$this->source)), "html"nulltrue);
  160.                     echo "円
  161.                                 ";
  162.                 }
  163.                 // line 39
  164.                 echo "                            </span>
  165.                         </p>
  166.                         ";
  167.             }
  168.             // line 42
  169.             echo "                    </div>
  170.                 </a>
  171.             </li>
  172.         ";
  173.             ++$context['loop']['index0'];
  174.             ++$context['loop']['index'];
  175.             $context['loop']['first'] = false;
  176.             if (isset($context['loop']['length'])) {
  177.                 --$context['loop']['revindex0'];
  178.                 --$context['loop']['revindex'];
  179.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  180.             }
  181.         }
  182.         $_parent $context['_parent'];
  183.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['RecommendProducts'], $context['_parent'], $context['loop']);
  184.         $context array_intersect_key($context$_parent) + $_parent;
  185.         // line 46
  186.         echo "    </ul>
  187.     </div>
  188. </div>
  189. </div>
  190. <!-- ▲item_list▲ -->";
  191.         
  192.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  193.         
  194.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  195.     }
  196.     public function getTemplateName()
  197.     {
  198.         return "Block/current_weekly_recommend_product.twig";
  199.     }
  200.     public function isTraitable()
  201.     {
  202.         return false;
  203.     }
  204.     public function getDebugInfo()
  205.     {
  206.         return array (  195 => 46,  178 => 42,  173 => 39,  167 => 37,  164 => 36,  156 => 34,  150 => 32,  147 => 31,  145 => 30,  141 => 28,  139 => 27,  135 => 26,  131 => 25,  127 => 24,  124 => 23,  119 => 21,  115 => 19,  106 => 18,  103 => 17,  97 => 16,  94 => 15,  91 => 14,  88 => 13,  83 => 12,  80 => 11,  77 => 10,  75 => 9,  58 => 8,  52 => 5,  47 => 2,  45 => 1,);
  207.     }
  208.     public function getSourceContext()
  209.     {
  210.         return new Source("{% set recommend_products = repository('Plugin\\\\Recommend42\\\\Entity\\\\RecommendProduct').getRecommendProduct %}
  211. <!-- ▼item_list▼ -->
  212. <div class=\"block_outer\">
  213. <div class=\"ec-shelfRole current-month__recommendation\" id=\"ranking_area\">
  214.     <h2 class=\"illust-title\"><img src=\"{{ asset('assets/img/icon/icon_book_green.png', 'user_data') }}\" alt=\"今週のオススメ\" class=\"aligncenter\" />今週のおすすめ</h2>
  215.     <div class=\"block_body\">
  216.     <ul class=\"ec-shelfGrid flex\">
  217.         {% for RecommendProducts in recommend_products %}
  218.             {# タグ #}
  219.             {% set newTag = false %}
  220.                 {% if RecommendProducts.Product.Tags is not null %}
  221.                     {% for tag in RecommendProducts.Product.Tags %}
  222.                     {% if tag.id == 1 %}
  223.                         {% set newTag = true %}
  224.                     {% endif %}
  225.                 {% endfor %}
  226.             {% endif %}
  227.             <li class=\"ec-shelfGrid__item rank-item flex{% if newTag %} newtag{% endif %}\" id=\"rank{{ loop.index }}\">
  228.                 <a href=\"{{ url('product_detail', {'id': RecommendProducts.Product.id}) }}\">
  229.                     {# 画像 #}
  230.                     <div class=\"productImage\"><img  class=\"rankpicture\" src=\"{{ asset(RecommendProducts.Product.mainFileName|no_image_product, \"save_image\") }}\"></div>
  231.                     {# その他 #}
  232.                     <div class=\"productContents\">
  233.                         <p class=\"product-subname\">{{ RecommendProducts.Product.SubNameUp }}</p>
  234.                         <h3>{{ RecommendProducts.Product.name }}</h3>
  235.                         <p class=\"product-subname\">{{ RecommendProducts.Product.SubNameDown }}</p>
  236.                         {% if loop.index == 1 %}
  237. \t\t\t\t\t\t<p class=\"productPrice\">定価:
  238.                             <span class=\"sale_price\">
  239.                                 {% if RecommendProducts.Product.hasProductClass %}
  240.                                     {% if RecommendProducts.Product.getPrice02Min == RecommendProducts.Product.getPrice02Max %}
  241.                                         {{ RecommendProducts.Product.getPrice02IncTaxMin|number_format }}円
  242.                                     {% else %}
  243.                                         {{ RecommendProducts.Product.getPrice02IncTaxMin|number_format }}円 ~ {{ RecommendProducts.Product.getPrice02IncTaxMax|number_format }}円
  244.                                     {% endif %}
  245.                                 {% else %}
  246.                                     {{ RecommendProducts.Product.getPrice02IncTaxMin|number_format }}円
  247.                                 {% endif %}
  248.                             </span>
  249.                         </p>
  250.                         {% endif %}
  251.                     </div>
  252.                 </a>
  253.             </li>
  254.         {% endfor %}
  255.     </ul>
  256.     </div>
  257. </div>
  258. </div>
  259. <!-- ▲item_list▲ -->""Block/current_weekly_recommend_product.twig""/home/higashiyamashobo/www/higashiyamashobo.jpn.org/ec-cube/app/template/default/Block/current_weekly_recommend_product.twig");
  260.     }
  261.     
  262.     public function checkSecurity()
  263.     {
  264.         static $tags = array("set" => 1"for" => 8"if" => 11);
  265.         static $filters = array("escape" => 5"no_image_product" => 21"number_format" => 32);
  266.         static $functions = array("repository" => 1"asset" => 5"url" => 19);
  267.         try {
  268.             $this->sandbox->checkSecurity(
  269.                 ['set''for''if'],
  270.                 ['escape''no_image_product''number_format'],
  271.                 ['repository''asset''url']
  272.             );
  273.         } catch (SecurityError $e) {
  274.             $e->setSourceContext($this->source);
  275.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  276.                 $e->setTemplateLine($tags[$e->getTagName()]);
  277.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  278.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  279.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  280.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  281.             }
  282.             throw $e;
  283.         }
  284.     }
  285. }