var/cache/dev/twig/bd/bda17c2228d6fbf81dd6802daf3742b39f2520d2906e9fd3d708494d2c5792dd.php line 16

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/etuna_item_ranking.twig */
  14. class __TwigTemplate_15852d497c291e1d40c6c883cd1f68a77d670fb903ee5b8232d3f962e55f5259 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.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/etuna_item_ranking.twig"));
  31.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/etuna_item_ranking.twig"));
  33.         // line 9
  34.         echo "
  35. ";
  36.         // line 11
  37.         if ( !twig_test_empty((isset($context["ItemRanking"]) || array_key_exists("ItemRanking"$context) ? $context["ItemRanking"] : (function () { throw new RuntimeError('Variable "ItemRanking" does not exist.'11$this->source); })()))) {
  38.             // line 12
  39.             echo "    <section class=\"ranking\">
  40.         <div class=\"container\">
  41.             ";
  42.             // line 14
  43.             if ((twig_get_attribute($this->env$this->source, (isset($context["Config"]) || array_key_exists("Config"$context) ? $context["Config"] : (function () { throw new RuntimeError('Variable "Config" does not exist.'14$this->source); })()), "item_ranking_title", [], "any"falsefalsefalse14) != "")) {
  44.                 // line 15
  45.                 echo "            <h2 class=\"section-title\">
  46.                 <span class=\"_sub\">
  47.                     RANKING
  48.                 </span>
  49.                 <span class=\"_main\">
  50.                     ";
  51.                 // line 20
  52.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Config"]) || array_key_exists("Config"$context) ? $context["Config"] : (function () { throw new RuntimeError('Variable "Config" does not exist.'20$this->source); })()), "item_ranking_title", [], "any"falsefalsefalse20), "html"nulltrue);
  53.                 echo "
  54.                 </span>
  55.             </h2>
  56.             ";
  57.             }
  58.             // line 24
  59.             echo "            <div class=\"ranking__content\">
  60.                 <div class=\"ranking__list\">
  61.                 ";
  62.             // line 27
  63.             $context['_parent'] = $context;
  64.             $context['_seq'] = twig_ensure_traversable((isset($context["ItemRanking"]) || array_key_exists("ItemRanking"$context) ? $context["ItemRanking"] : (function () { throw new RuntimeError('Variable "ItemRanking" does not exist.'27$this->source); })()));
  65.             $context['loop'] = [
  66.               'parent' => $context['_parent'],
  67.               'index0' => 0,
  68.               'index'  => 1,
  69.               'first'  => true,
  70.             ];
  71.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  72.                 $length count($context['_seq']);
  73.                 $context['loop']['revindex0'] = $length 1;
  74.                 $context['loop']['revindex'] = $length;
  75.                 $context['loop']['length'] = $length;
  76.                 $context['loop']['last'] = === $length;
  77.             }
  78.             foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
  79.                 // line 28
  80.                 echo "                
  81.                     <a class=\"ranking__item card-rank\" href=\"";
  82.                 // line 29
  83.                 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["item"], "id", [], "any"falsefalsefalse29)]), "html"nulltrue);
  84.                 echo "\">
  85.                         ";
  86.                 // line 30
  87.                 if ((twig_get_attribute($this->env$this->source, (isset($context["Config"]) || array_key_exists("Config"$context) ? $context["Config"] : (function () { throw new RuntimeError('Variable "Config" does not exist.'30$this->source); })()), "item_ranking_disp_title", [], "any"falsefalsefalse30) == 1)) {
  88.                     // line 31
  89.                     echo "                            <div class=\"card-rank__rank\">   
  90.                                 <span class=\"num\">
  91.                                     ";
  92.                     // line 33
  93.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["loop"], "index", [], "any"falsefalsefalse33), "html"nulltrue);
  94.                     echo "
  95.                                 </span>
  96.                                 位
  97.                             </div>
  98.                         ";
  99.                 }
  100.                 // line 38
  101.                 echo "
  102.                         ";
  103.                 // line 39
  104.                 $context['_parent'] = $context;
  105.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["item"], "ProductImage", [], "any"falsefalsefalse39));
  106.                 $context['_iterated'] = false;
  107.                 $context['loop'] = [
  108.                   'parent' => $context['_parent'],
  109.                   'index0' => 0,
  110.                   'index'  => 1,
  111.                   'first'  => true,
  112.                 ];
  113.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  114.                     $length count($context['_seq']);
  115.                     $context['loop']['revindex0'] = $length 1;
  116.                     $context['loop']['revindex'] = $length;
  117.                     $context['loop']['length'] = $length;
  118.                     $context['loop']['last'] = === $length;
  119.                 }
  120.                 foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
  121.                     // line 40
  122.                     echo "                            ";
  123.                     if (twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse40)) {
  124.                         // line 41
  125.                         echo "                            <div class=\"card-rank__img\">
  126.                                 <img src=\"";
  127.                         // line 42
  128.                         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["image"], "save_image"), "html"nulltrue);
  129.                         echo "\">
  130.                             </div>
  131.                             ";
  132.                     }
  133.                     // line 45
  134.                     echo "                        ";
  135.                     $context['_iterated'] = true;
  136.                     ++$context['loop']['index0'];
  137.                     ++$context['loop']['index'];
  138.                     $context['loop']['first'] = false;
  139.                     if (isset($context['loop']['length'])) {
  140.                         --$context['loop']['revindex0'];
  141.                         --$context['loop']['revindex'];
  142.                         $context['loop']['last'] = === $context['loop']['revindex0'];
  143.                     }
  144.                 }
  145.                 if (!$context['_iterated']) {
  146.                     // line 46
  147.                     echo "                            <div class=\"card-rank__img\">
  148.                                 <img src=\"";
  149.                     // line 47
  150.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(""), "save_image"), "html"nulltrue);
  151.                     echo "\"/>
  152.                             </div>
  153.                         ";
  154.                 }
  155.                 $_parent $context['_parent'];
  156.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
  157.                 $context array_intersect_key($context$_parent) + $_parent;
  158.                 // line 50
  159.                 echo "                        ";
  160.                 if ((twig_get_attribute($this->env$this->source, (isset($context["Config"]) || array_key_exists("Config"$context) ? $context["Config"] : (function () { throw new RuntimeError('Variable "Config" does not exist.'50$this->source); })()), "item_ranking_disp_title", [], "any"falsefalsefalse50) == 1)) {
  161.                     // line 51
  162.                     echo "                            <h3 class=\"card-rank__title\">
  163.                                 ";
  164.                     // line 52
  165.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["item"], "name", [], "any"falsefalsefalse52), "html"nulltrue);
  166.                     echo 
  167.                             </h3>
  168.                         ";
  169.                 }
  170.                 // line 55
  171.                 echo "                        ";
  172.                 if (twig_get_attribute($this->env$this->source$context["item"], "author_name", [], "any"falsefalsefalse55)) {
  173.                     // line 56
  174.                     echo "                            <p class=\"card-rank__author\">
  175.                                 著者:";
  176.                     // line 57
  177.                     echo twig_nl2br(twig_get_attribute($this->env$this->source$context["item"], "author_name", [], "any"falsefalsefalse57));
  178.                     echo "
  179.                             </p>
  180.                         ";
  181.                 }
  182.                 // line 60
  183.                 echo "                    </a>
  184.                 ";
  185.                 ++$context['loop']['index0'];
  186.                 ++$context['loop']['index'];
  187.                 $context['loop']['first'] = false;
  188.                 if (isset($context['loop']['length'])) {
  189.                     --$context['loop']['revindex0'];
  190.                     --$context['loop']['revindex'];
  191.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  192.                 }
  193.             }
  194.             $_parent $context['_parent'];
  195.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
  196.             $context array_intersect_key($context$_parent) + $_parent;
  197.             // line 62
  198.             echo "                </div>
  199.             </div>
  200.         </div>
  201.     </section>
  202. ";
  203.         }
  204.         
  205.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  206.         
  207.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  208.     }
  209.     public function getTemplateName()
  210.     {
  211.         return "Block/etuna_item_ranking.twig";
  212.     }
  213.     public function isTraitable()
  214.     {
  215.         return false;
  216.     }
  217.     public function getDebugInfo()
  218.     {
  219.         return array (  209 => 62,  194 => 60,  188 => 57,  185 => 56,  182 => 55,  176 => 52,  173 => 51,  170 => 50,  161 => 47,  158 => 46,  145 => 45,  139 => 42,  136 => 41,  133 => 40,  115 => 39,  112 => 38,  104 => 33,  100 => 31,  98 => 30,  94 => 29,  91 => 28,  74 => 27,  69 => 24,  62 => 20,  55 => 15,  53 => 14,  49 => 12,  47 => 11,  43 => 9,);
  220.     }
  221.     public function getSourceContext()
  222.     {
  223.         return new Source("{#
  224. This file is part of EC-CUBE
  225. Copyright(c) Takashi Otaki All Rights Reserved.
  226. For the full copyright and license information, please view the LICENSE
  227. file that was distributed with this source code.
  228. #}
  229. {% if ItemRanking is not empty %}
  230.     <section class=\"ranking\">
  231.         <div class=\"container\">
  232.             {% if Config.item_ranking_title != \"\" %}
  233.             <h2 class=\"section-title\">
  234.                 <span class=\"_sub\">
  235.                     RANKING
  236.                 </span>
  237.                 <span class=\"_main\">
  238.                     {{ Config.item_ranking_title }}
  239.                 </span>
  240.             </h2>
  241.             {% endif %}
  242.             <div class=\"ranking__content\">
  243.                 <div class=\"ranking__list\">
  244.                 {% for item in ItemRanking %}
  245.                 
  246.                     <a class=\"ranking__item card-rank\" href=\"{{ url('product_detail', {'id': item.id}) }}\">
  247.                         {% if Config.item_ranking_disp_title == 1 %}
  248.                             <div class=\"card-rank__rank\">   
  249.                                 <span class=\"num\">
  250.                                     {{ loop.index }}
  251.                                 </span>
  252.                                 位
  253.                             </div>
  254.                         {% endif %}
  255.                         {% for image in item.ProductImage %}
  256.                             {% if loop.first %}
  257.                             <div class=\"card-rank__img\">
  258.                                 <img src=\"{{ asset(image, 'save_image') }}\">
  259.                             </div>
  260.                             {% endif %}
  261.                         {% else %}
  262.                             <div class=\"card-rank__img\">
  263.                                 <img src=\"{{ asset(''|no_image_product, 'save_image') }}\"/>
  264.                             </div>
  265.                         {%endfor%}
  266.                         {% if Config.item_ranking_disp_title == 1 %}
  267.                             <h3 class=\"card-rank__title\">
  268.                                 {{ item.name }} 
  269.                             </h3>
  270.                         {% endif %}
  271.                         {% if item.author_name %}
  272.                             <p class=\"card-rank__author\">
  273.                                 著者:{{ item.author_name|raw|nl2br }}
  274.                             </p>
  275.                         {% endif %}
  276.                     </a>
  277.                 {% endfor %}
  278.                 </div>
  279.             </div>
  280.         </div>
  281.     </section>
  282. {% endif %}""Block/etuna_item_ranking.twig""/home/saicomp/stg-site.jp/public_html/cosmo-test3.stg-site.jp/app/template/default/Block/etuna_item_ranking.twig");
  283.     }
  284. }