var/cache/dev/twig/f9/f9ed19a91b1c33add1b7f7dfd27da86b.php line 33

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/news.twig */
  14. class __TwigTemplate_ac49dd6a4e673483df059242f339ec87 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_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/news.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/news.twig"));
  33.         // line 11
  34.         $context["NewsList"] = twig_get_attribute($this->env$this->source$this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\News"), "getList", [], "method"falsefalsefalse11);
  35.         // line 12
  36.         echo "
  37. <div class=\"b-news\">
  38.     <div class=\"b-news__body\">
  39.         <h2 class=\"b-news__title c-animation-fade js-animation-fade\">
  40.             <span class=\"b-news__title--main\">";
  41.         // line 16
  42.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("News"), "html"nulltrue);
  43.         echo "</span>
  44.             <span class=\"b-news__title--sub\">";
  45.         // line 17
  46.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Information & Updates"), "html"nulltrue);
  47.         echo "</span>
  48.         </h2>
  49.         <div class=\"b-news__contents c-animation-fade js-animation-fade\" id=\"js-news__contents\">
  50.             ";
  51.         // line 20
  52.         $context['_parent'] = $context;
  53.         $context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList"$context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.'20$this->source); })()));
  54.         foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
  55.             // line 21
  56.             echo "                <section class=\"b-news__post js-news__post\">
  57.                     <header class=\"b-news__post-heading";
  58.             // line 22
  59.             if ((twig_get_attribute($this->env$this->source$context["News"], "description", [], "any"falsefalsefalse22) || twig_get_attribute($this->env$this->source$context["News"], "url", [], "any"falsefalsefalse22))) {
  60.                 echo " js-news__post-heading";
  61.             }
  62.             if ((twig_get_attribute($this->env$this->source$context["News"], "description", [], "any"falsefalsefalse22) || twig_get_attribute($this->env$this->source$context["News"], "url", [], "any"falsefalsefalse22))) {
  63.                 echo " has-link";
  64.             }
  65.             echo "\">
  66.                         <div class=\"b-news__post-heading-contents\">
  67.                             <p class=\"b-news__post-date\">";
  68.             // line 24
  69.             echo twig_escape_filter($this->env$this->extensions['Eccube\Twig\Extension\IntlExtension']->date_day($this->envtwig_get_attribute($this->env$this->source$context["News"], "publish_date", [], "any"falsefalsefalse24)), "html"nulltrue);
  70.             echo "</p>
  71.                             <h3 class=\"b-news__post-title\">";
  72.             // line 25
  73.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["News"], "title", [], "any"falsefalsefalse25), "html"nulltrue);
  74.             echo "</h3>
  75.                         </div>
  76.                         ";
  77.             // line 27
  78.             if ((twig_get_attribute($this->env$this->source$context["News"], "description", [], "any"falsefalsefalse27) || twig_get_attribute($this->env$this->source$context["News"], "url", [], "any"falsefalsefalse27))) {
  79.                 // line 28
  80.                 echo "                            <div class=\"b-news__post-actions\">
  81.                                 <i class=\"b-news__post-actions-icon c-animation--rotate-forward material-icons\">expand_more</i>
  82.                             </div>
  83.                         ";
  84.             }
  85.             // line 32
  86.             echo "                    </header>
  87.                     <div class=\"b-news__post-contents js-news__post-contents\">
  88.                         ";
  89.             // line 34
  90.             echo twig_nl2br(twig_get_attribute($this->env$this->source$context["News"], "description", [], "any"falsefalsefalse34));
  91.             if (twig_get_attribute($this->env$this->source$context["News"], "url", [], "any"falsefalsefalse34)) {
  92.                 echo "<a href=\"";
  93.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["News"], "url", [], "any"falsefalsefalse34), "html"nulltrue);
  94.                 echo "\" ";
  95.                 if ((twig_get_attribute($this->env$this->source$context["News"], "link_method", [], "any"falsefalsefalse34) == "1")) {
  96.                     echo "target=\"_blank\"";
  97.                 }
  98.                 echo ">";
  99.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("詳しくはこちら"), "html"nulltrue);
  100.                 echo "</a>";
  101.             }
  102.             // line 35
  103.             echo "                    </div>
  104.                 </section>
  105.             ";
  106.         }
  107.         $_parent $context['_parent'];
  108.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
  109.         $context array_intersect_key($context$_parent) + $_parent;
  110.         // line 38
  111.         echo "            ";
  112.         if ((twig_length_filter($this->env, (isset($context["NewsList"]) || array_key_exists("NewsList"$context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.'38$this->source); })())) > 5)) {
  113.             // line 39
  114.             echo "                <div class=\"b-news__actions\" id=\"js-news__actions\">
  115.                     <div class=\"b-news__actions-item\">
  116.                         <button class=\"c-button mdc-button\" id=\"js-news-button\" data-mdc-auto-init=\"MDCRipple\">
  117.                             <span class=\"c-button__label mdc-button__label\">もっと見る</span>
  118.                         </button>
  119.                     </div>
  120.                 </div>
  121.             ";
  122.         }
  123.         // line 47
  124.         echo "        </div>
  125.     </div>
  126. </div>
  127. ";
  128.         
  129.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  130.         
  131.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  132.     }
  133.     public function getTemplateName()
  134.     {
  135.         return "Block/news.twig";
  136.     }
  137.     public function isTraitable()
  138.     {
  139.         return false;
  140.     }
  141.     public function getDebugInfo()
  142.     {
  143.         return array (  133 => 47,  123 => 39,  120 => 38,  112 => 35,  99 => 34,  95 => 32,  89 => 28,  87 => 27,  82 => 25,  78 => 24,  68 => 22,  65 => 21,  61 => 20,  55 => 17,  51 => 16,  45 => 12,  43 => 11,);
  144.     }
  145.     public function getSourceContext()
  146.     {
  147.         return new Source("{#
  148. This file is part of EC-CUBE
  149. Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
  150. http://www.lockon.co.jp/
  151. For the full copyright and license information, please view the LICENSE
  152. file that was distributed with this source code.
  153. #}
  154. {% set NewsList = repository('Eccube\\\\Entity\\\\News').getList() %}
  155. <div class=\"b-news\">
  156.     <div class=\"b-news__body\">
  157.         <h2 class=\"b-news__title c-animation-fade js-animation-fade\">
  158.             <span class=\"b-news__title--main\">{{ 'News'|trans }}</span>
  159.             <span class=\"b-news__title--sub\">{{ 'Information & Updates'|trans }}</span>
  160.         </h2>
  161.         <div class=\"b-news__contents c-animation-fade js-animation-fade\" id=\"js-news__contents\">
  162.             {% for News in NewsList %}
  163.                 <section class=\"b-news__post js-news__post\">
  164.                     <header class=\"b-news__post-heading{% if News.description or News.url %} js-news__post-heading{% endif %}{% if News.description or News.url %} has-link{% endif %}\">
  165.                         <div class=\"b-news__post-heading-contents\">
  166.                             <p class=\"b-news__post-date\">{{ News.publish_date|date_day }}</p>
  167.                             <h3 class=\"b-news__post-title\">{{ News.title }}</h3>
  168.                         </div>
  169.                         {% if News.description or News.url %}
  170.                             <div class=\"b-news__post-actions\">
  171.                                 <i class=\"b-news__post-actions-icon c-animation--rotate-forward material-icons\">expand_more</i>
  172.                             </div>
  173.                         {% endif %}
  174.                     </header>
  175.                     <div class=\"b-news__post-contents js-news__post-contents\">
  176.                         {{ News.description|raw|nl2br }}{% if News.url %}<a href=\"{{ News.url }}\" {% if News.link_method == '1' %}target=\"_blank\"{% endif %}>{{ '詳しくはこちら'|trans }}</a>{% endif %}
  177.                     </div>
  178.                 </section>
  179.             {% endfor %}
  180.             {% if NewsList|length > 5 %}
  181.                 <div class=\"b-news__actions\" id=\"js-news__actions\">
  182.                     <div class=\"b-news__actions-item\">
  183.                         <button class=\"c-button mdc-button\" id=\"js-news-button\" data-mdc-auto-init=\"MDCRipple\">
  184.                             <span class=\"c-button__label mdc-button__label\">もっと見る</span>
  185.                         </button>
  186.                     </div>
  187.                 </div>
  188.             {% endif %}
  189.         </div>
  190.     </div>
  191. </div>
  192. {# scriptはindex.twigに記載 #}
  193. ""Block/news.twig""/home/rocroc/tsmt-store.com/public_html/app/template/ss4002/Block/news.twig");
  194.     }
  195. }