var/cache/dev/twig/4c/4cf0580a1aec7adc85a8a821500f7a0c6f1eb445b0b26cde7fad2aab971694e0.php line 34

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/cat_img.twig */
  14. class __TwigTemplate_810c94319cedc02983edebc563215daf7d8956ceeb939ef3567519c515a1c668 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.         $macros["_self"] = $this->macros["_self"] = $this;
  26.     }
  27.     protected function doDisplay(array $context, array $blocks = [])
  28.     {
  29.         $macros $this->macros;
  30.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  31.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/cat_img.twig"));
  32.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  33.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Block/cat_img.twig"));
  34.         // line 10
  35.         echo "
  36. ";
  37.         // line 11
  38.         $macros["macros"] = $this->macros["macros"] = $this;
  39.         // line 12
  40.         echo "
  41. <div class=\"category-head\">
  42.     <img src=\"";
  43.         // line 14
  44.         echo twig_call_macro($macros["macros"], "macro_getCategoryImage", [(isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'14$this->source); })())], 14$context$this->getSourceContext());
  45.         echo "\" alt=\"";
  46.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'14$this->source); })()), "name", [], "any"falsefalsefalse14), "html"nulltrue);
  47.         echo "\">
  48. </div>
  49. <div class=\"cat-name-box\">
  50.     ";
  51.         // line 17
  52.         if ((isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'17$this->source); })())) {
  53.             // line 18
  54.             echo "        ";
  55.             $context['_parent'] = $context;
  56.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["Category"]) || array_key_exists("Category"$context) ? $context["Category"] : (function () { throw new RuntimeError('Variable "Category" does not exist.'18$this->source); })()), "path", [], "any"falsefalsefalse18));
  57.             $context['loop'] = [
  58.               'parent' => $context['_parent'],
  59.               'index0' => 0,
  60.               'index'  => 1,
  61.               'first'  => true,
  62.             ];
  63.             if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  64.                 $length count($context['_seq']);
  65.                 $context['loop']['revindex0'] = $length 1;
  66.                 $context['loop']['revindex'] = $length;
  67.                 $context['loop']['length'] = $length;
  68.                 $context['loop']['last'] = === $length;
  69.             }
  70.             foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
  71.                 // line 19
  72.                 echo "            ";
  73.                 if (twig_get_attribute($this->env$this->source$context["loop"], "last", [], "any"falsefalsefalse19)) {
  74.                     // line 20
  75.                     echo "                <div class=\"cat-name-sbox\"><p>";
  76.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["Path"], "name", [], "any"falsefalsefalse20), "html"nulltrue);
  77.                     echo "</p></div>
  78.             ";
  79.                 }
  80.                 // line 22
  81.                 echo "        ";
  82.                 ++$context['loop']['index0'];
  83.                 ++$context['loop']['index'];
  84.                 $context['loop']['first'] = false;
  85.                 if (isset($context['loop']['length'])) {
  86.                     --$context['loop']['revindex0'];
  87.                     --$context['loop']['revindex'];
  88.                     $context['loop']['last'] = === $context['loop']['revindex0'];
  89.                 }
  90.             }
  91.             $_parent $context['_parent'];
  92.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
  93.             $context array_intersect_key($context$_parent) + $_parent;
  94.             // line 23
  95.             echo "    ";
  96.         }
  97.         // line 24
  98.         echo "</div>";
  99.         
  100.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  101.         
  102.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  103.     }
  104.     // line 1
  105.     public function macro_getCategoryImage($__category__ null, ...$__varargs__)
  106.     {
  107.         $macros $this->macros;
  108.         $context $this->env->mergeGlobals([
  109.             "category" => $__category__,
  110.             "varargs" => $__varargs__,
  111.         ]);
  112.         $blocks = [];
  113.         ob_start();
  114.         try {
  115.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  116.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""getCategoryImage"));
  117.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  118.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""getCategoryImage"));
  119.             // line 2
  120.             echo "    ";
  121.             if (twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'2$this->source); })()), "category_image", [], "any"falsefalsefalse2)) {
  122.                 // line 3
  123.                 echo "        ";
  124.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct(twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'3$this->source); })()), "category_image", [], "any"falsefalsefalse3)), "save_image"), "html"nulltrue);
  125.                 echo "
  126.     ";
  127.             } elseif (twig_get_attribute($this->env$this->source,             // line 4
  128. (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'4$this->source); })()), "Parent", [], "any"falsefalsefalse4)) {
  129.                 // line 5
  130.                 echo "        ";
  131.                 echo twig_call_macro($macros["_self"], "macro_getCategoryImage", [twig_get_attribute($this->env$this->source, (isset($context["category"]) || array_key_exists("category"$context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.'5$this->source); })()), "Parent", [], "any"falsefalsefalse5)], 5$context$this->getSourceContext());
  132.                 echo "
  133.     ";
  134.             } else {
  135.                 // line 7
  136.                 echo "        ";
  137.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/html/user_data/assets/img/headimg.png"), "html"nulltrue);
  138.                 echo "
  139.     ";
  140.             }
  141.             
  142.             $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  143.             
  144.             $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  145.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  146.         } finally {
  147.             ob_end_clean();
  148.         }
  149.     }
  150.     public function getTemplateName()
  151.     {
  152.         return "Block/cat_img.twig";
  153.     }
  154.     public function isTraitable()
  155.     {
  156.         return false;
  157.     }
  158.     public function getDebugInfo()
  159.     {
  160.         return array (  152 => 7,  146 => 5,  144 => 4,  139 => 3,  136 => 2,  117 => 1,  107 => 24,  104 => 23,  90 => 22,  84 => 20,  81 => 19,  63 => 18,  61 => 17,  53 => 14,  49 => 12,  47 => 11,  44 => 10,);
  161.     }
  162.     public function getSourceContext()
  163.     {
  164.         return new Source("{% macro getCategoryImage(category) %}
  165.     {% if category.category_image %}
  166.         {{ asset(category.category_image|no_image_product, 'save_image') }}
  167.     {% elseif category.Parent %}
  168.         {{ _self.getCategoryImage(category.Parent) }}
  169.     {% else %}
  170.         {{ asset('/html/user_data/assets/img/headimg.png') }}
  171.     {% endif %}
  172. {% endmacro %}
  173. {% import _self as macros %}
  174. <div class=\"category-head\">
  175.     <img src=\"{{ macros.getCategoryImage(Category) }}\" alt=\"{{ Category.name }}\">
  176. </div>
  177. <div class=\"cat-name-box\">
  178.     {% if Category %}
  179.         {% for Path in Category.path %}
  180.             {% if loop.last %}
  181.                 <div class=\"cat-name-sbox\"><p>{{ Path.name }}</p></div>
  182.             {% endif %}
  183.         {% endfor %}
  184.     {% endif %}
  185. </div>""Block/cat_img.twig""/home/northserver/tcg-mana.com/public_html/app/template/default/Block/cat_img.twig");
  186.     }
  187. }