var/cache/dev/twig/75/751b01463db16b0122d0731c891ee101.php line 51

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. /* Favorite/favorite.twig */
  14. class __TwigTemplate_2ab185c45fa655e77fa57d0678ee7062 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->blocks = [
  23.             'javascript' => [$this'block_javascript'],
  24.             'main' => [$this'block_main'],
  25.         ];
  26.         $this->sandbox $this->env->getExtension('\Twig\Extension\SandboxExtension');
  27.         $this->checkSecurity();
  28.     }
  29.     protected function doGetParent(array $context)
  30.     {
  31.         // line 1
  32.         return "default_frame.twig";
  33.     }
  34.     protected function doDisplay(array $context, array $blocks = [])
  35.     {
  36.         $macros $this->macros;
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  38.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Favorite/favorite.twig"));
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  40.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Favorite/favorite.twig"));
  41.         $this->parent $this->loadTemplate("default_frame.twig""Favorite/favorite.twig"1);
  42.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  43.         
  44.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  45.         
  46.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  47.     }
  48.     // line 3
  49.     public function block_javascript($context, array $blocks = [])
  50.     {
  51.         $macros $this->macros;
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascript"));
  56.         // line 4
  57.         echo "    <script>
  58.         var localfavo = localStorage.getItem('favo');
  59.         if(localfavo) {
  60.             var lsfavo = JSON.parse(localfavo);
  61.             console.log(lsfavo);
  62.             if (lsfavo.length){
  63.                 for (i=0;i<lsfavo.length;i++) {
  64.                     var html = '<li class=\"ec-shelfGrid__item position-relative pb-4\">';
  65.                     html += '<a href=\"https://tanzoec.apteq5x.com/products/detail/' + lsfavo[i][0] + '\">';
  66.                     html += '<p class=\"ec-shelfGrid__item-image\">';
  67.                     html += '<img src=\"/html/upload/save_image/' + lsfavo[i][1] + '\" alt=\"' + lsfavo[i][2] + '\">';
  68.                     html += '</p><p>' + lsfavo[i][2] + '</P>';
  69.                     html += '<p class=\"price02-default\">' + lsfavo[i][3] + '</p></a>';
  70.                     html += '<span onclick=\"del_favo(' + lsfavo[i][0] + ')\" class=\"delete_favo position-absolute text-white d-flex justify-content-center align-items-center\"><i class=\"bi bi-trash3\"></i></span>';
  71.                     html += '</li>';
  72.         
  73.                     \$('#favo_list').append(html);
  74.                 }
  75.             } else {
  76.                 \$('#favo_list').append('<li class=\"p-3\">お気に入りが登録されていません</li>');
  77.             }
  78.         }
  79.  
  80.     </script>
  81. ";
  82.         
  83.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  84.         
  85.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  86.     }
  87.     // line 30
  88.     public function block_main($context, array $blocks = [])
  89.     {
  90.         $macros $this->macros;
  91.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  92.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  93.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  94.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""main"));
  95.         // line 31
  96.         echo "    <div class=\"ec-pageHeader\">
  97.         <h1>";
  98.         // line 32
  99.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("お気に入りリスト"), "html"nulltrue);
  100.         echo "</h1>
  101.     </div>
  102.     <div class=\"ec-shelfRole\">
  103.         <ul id=\"favo_list\" class=\"ec-shelfGrid\">
  104.         </ul>
  105.     </div>
  106. ";
  107.         
  108.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  109.         
  110.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  111.     }
  112.     public function getTemplateName()
  113.     {
  114.         return "Favorite/favorite.twig";
  115.     }
  116.     public function isTraitable()
  117.     {
  118.         return false;
  119.     }
  120.     public function getDebugInfo()
  121.     {
  122.         return array (  118 => 32,  115 => 31,  105 => 30,  71 => 4,  61 => 3,  38 => 1,);
  123.     }
  124.     public function getSourceContext()
  125.     {
  126.         return new Source("{% extends 'default_frame.twig' %}
  127. {% block javascript %}
  128.     <script>
  129.         var localfavo = localStorage.getItem('favo');
  130.         if(localfavo) {
  131.             var lsfavo = JSON.parse(localfavo);
  132.             console.log(lsfavo);
  133.             if (lsfavo.length){
  134.                 for (i=0;i<lsfavo.length;i++) {
  135.                     var html = '<li class=\"ec-shelfGrid__item position-relative pb-4\">';
  136.                     html += '<a href=\"https://tanzoec.apteq5x.com/products/detail/' + lsfavo[i][0] + '\">';
  137.                     html += '<p class=\"ec-shelfGrid__item-image\">';
  138.                     html += '<img src=\"/html/upload/save_image/' + lsfavo[i][1] + '\" alt=\"' + lsfavo[i][2] + '\">';
  139.                     html += '</p><p>' + lsfavo[i][2] + '</P>';
  140.                     html += '<p class=\"price02-default\">' + lsfavo[i][3] + '</p></a>';
  141.                     html += '<span onclick=\"del_favo(' + lsfavo[i][0] + ')\" class=\"delete_favo position-absolute text-white d-flex justify-content-center align-items-center\"><i class=\"bi bi-trash3\"></i></span>';
  142.                     html += '</li>';
  143.         
  144.                     \$('#favo_list').append(html);
  145.                 }
  146.             } else {
  147.                 \$('#favo_list').append('<li class=\"p-3\">お気に入りが登録されていません</li>');
  148.             }
  149.         }
  150.  
  151.     </script>
  152. {% endblock %}
  153. {% block main %}
  154.     <div class=\"ec-pageHeader\">
  155.         <h1>{{ 'お気に入りリスト'|trans }}</h1>
  156.     </div>
  157.     <div class=\"ec-shelfRole\">
  158.         <ul id=\"favo_list\" class=\"ec-shelfGrid\">
  159.         </ul>
  160.     </div>
  161. {% endblock %}""Favorite/favorite.twig""/home/apteq5/apteq5x.com/public_html/tanzoec/app/template/tanzo/Favorite/favorite.twig");
  162.     }
  163.     
  164.     public function checkSecurity()
  165.     {
  166.         static $tags = array();
  167.         static $filters = array("escape" => 32"trans" => 32);
  168.         static $functions = array();
  169.         try {
  170.             $this->sandbox->checkSecurity(
  171.                 [],
  172.                 ['escape''trans'],
  173.                 []
  174.             );
  175.         } catch (SecurityError $e) {
  176.             $e->setSourceContext($this->source);
  177.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  178.                 $e->setTemplateLine($tags[$e->getTagName()]);
  179.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  180.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  181.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  182.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  183.             }
  184.             throw $e;
  185.         }
  186.     }
  187. }