<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* Block/mob_list_news.twig */
class __TwigTemplate_ff25315c7e4478125bf76029dd96505faaf36ab2bfa1a826df6a268aa5a6bb3e extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/mob_list_news.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Block/mob_list_news.twig"));
// line 11
echo "
";
// line 12
$context["hasCategory"] = false;
// line 13
echo "
";
// line 14
$context["request_uri"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 14, $this->source); })()), "request", [], "any", false, false, false, 14), "server", [], "any", false, false, false, 14), "get", [0 => "REQUEST_URI"], "method", false, false, false, 14);
// line 15
if (twig_in_filter("name=", (isset($context["request_uri"]) || array_key_exists("request_uri", $context) ? $context["request_uri"] : (function () { throw new RuntimeError('Variable "request_uri" does not exist.', 15, $this->source); })()))) {
// line 16
echo "
";
} else {
// line 18
echo " ";
$context["hasCategory"] = true;
}
// line 20
echo "
";
// line 21
if ((isset($context["hasCategory"]) || array_key_exists("hasCategory", $context) ? $context["hasCategory"] : (function () { throw new RuntimeError('Variable "hasCategory" does not exist.', 21, $this->source); })())) {
// line 22
$context["RootCategory"] = 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.', 22, $this->source); })()), "RootCategory", [], "any", false, false, false, 22);
// line 23
echo "
";
// line 24
$context["NewsList"] = twig_get_attribute($this->env, $this->source, $this->env->getFunction('repository')->getCallable()("Eccube\\Entity\\News"), "getList", [], "method", false, false, false, 24);
// line 25
echo "
<!--現在のカテゴリID取得-->
";
// line 27
$context["now_id"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 27, $this->source); })()), "request", [], "any", false, false, false, 27), "query", [], "any", false, false, false, 27), "get", [0 => "category_id"], "method", false, false, false, 27);
// line 28
echo "<!--買い取り配下のカテゴリ取得-->
";
// line 29
$context["cate_childs"] = twig_get_attribute($this->env, $this->source, (isset($context["RootCategory"]) || array_key_exists("RootCategory", $context) ? $context["RootCategory"] : (function () { throw new RuntimeError('Variable "RootCategory" does not exist.', 29, $this->source); })()), "getDescendants", [], "any", false, false, false, 29);
// line 30
echo "<!--ルート表示-->
<!-- 現在カテゴリーから、親カテゴリに遡り「買い取り>ポケモンまで遡りたい」 -->
<!--現在カテゴリの上のカテゴリを取得 -->
";
// line 35
$context["nowparent"] = 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.', 35, $this->source); })()), "getParent", [], "method", false, false, false, 35);
// line 36
$context["h"] = (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.', 36, $this->source); })()), "hierarchy", [], "any", false, false, false, 36) - 1);
// line 37
echo "
<!--孫カテゴリ時に子カテゴリが表示された場合は親カテゴリへ -->
";
// line 39
if ((((isset($context["nowparent"]) || array_key_exists("nowparent", $context) ? $context["nowparent"] : (function () { throw new RuntimeError('Variable "nowparent" does not exist.', 39, $this->source); })()) == "シュヴァルツサイド") || ((isset($context["nowparent"]) || array_key_exists("nowparent", $context) ? $context["nowparent"] : (function () { throw new RuntimeError('Variable "nowparent" does not exist.', 39, $this->source); })()) == "ヴァイスサイド"))) {
// line 40
$context["nowparent"] = "ヴァイスシュヴァルツ";
}
// line 42
echo "
<div class=\"mob_top-content-box\">
";
// line 45
if (((((isset($context["nowparent"]) || array_key_exists("nowparent", $context) ? $context["nowparent"] : (function () { throw new RuntimeError('Variable "nowparent" does not exist.', 45, $this->source); })()) == "ヴァイスシュヴァルツ") || ((isset($context["now_id"]) || array_key_exists("now_id", $context) ? $context["now_id"] : (function () { throw new RuntimeError('Variable "now_id" does not exist.', 45, $this->source); })()) == 8)) || ((isset($context["now_id"]) || array_key_exists("now_id", $context) ? $context["now_id"] : (function () { throw new RuntimeError('Variable "now_id" does not exist.', 45, $this->source); })()) == 218))) {
echo "
<h2>
";
// line 48
echo " ";
$context['_parent'] = $context;
$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.', 48, $this->source); })()), "path", [], "any", false, false, false, 48));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
// line 49
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 49)) {
// line 50
echo " ";
echo "ヴァイスシュヴァルツ
";
}
// line 52
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 53
echo " ";
// line 54
echo " に関するニュース</h2>
<div class=\"news-box\">
";
// line 58
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList", $context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.', 58, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
// line 59
echo "
";
// line 60
if ((twig_get_attribute($this->env, $this->source, $context["News"], "category_id", [], "any", false, false, false, 60) == 8)) {
// line 61
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 61)) {
// line 62
echo " <div class=\"news-smallbox\">
<a href=\"";
// line 63
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 63), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["News"], "link_method", [], "any", false, false, false, 63) == "1")) {
echo "target=\"_blank\"";
}
echo ">
<div class=\"news-1\">
<div class=\"inter\">
";
// line 66
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IntlExtension']->date_day($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "publish_date", [], "any", false, false, false, 66)), "html", null, true);
echo "
</div>
<div class=\"\">
";
// line 70
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "title", [], "any", false, false, false, 70), "html", null, true);
echo "<span class=\"news-desc\">";
echo twig_nl2br(twig_get_attribute($this->env, $this->source, $context["News"], "description", [], "any", false, false, false, 70));
echo "</span>
</div>
</div>
</a>
</div>
";
} else {
// line 77
echo " <div class=\"news-smallbox\">
<a href=";
// line 78
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("news_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["News"], "id", [], "any", false, false, false, 78)]), "html", null, true);
echo " >
<div class=\"news-1\">
<div class=\"inter\">
";
// line 81
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IntlExtension']->date_day($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "publish_date", [], "any", false, false, false, 81)), "html", null, true);
echo "
</div>
<div class=\"\">
";
// line 85
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "title", [], "any", false, false, false, 85), "html", null, true);
echo "<span class=\"news-desc\">詳細はこちらをクリック</span>
</div>
</div>
</a>
</div>
";
}
// line 91
echo " ";
}
// line 92
echo "
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 94
echo "
</div>
";
} else {
// line 99
echo " <h2>
";
// line 101
echo " ";
$context['_parent'] = $context;
$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.', 101, $this->source); })()), "path", [], "any", false, false, false, 101));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["Path"]) {
// line 102
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 102)) {
// line 103
echo " ";
echo "ポケモン
";
}
// line 105
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Path'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 106
echo " ";
// line 107
echo " に関するニュース</h2>
";
// line 108
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["NewsList"]) || array_key_exists("NewsList", $context) ? $context["NewsList"] : (function () { throw new RuntimeError('Variable "NewsList" does not exist.', 108, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["News"]) {
// line 109
echo "
";
// line 110
if ((twig_get_attribute($this->env, $this->source, $context["News"], "category_id", [], "any", false, false, false, 110) == 7)) {
// line 111
echo "
";
// line 112
if (twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 112)) {
// line 113
echo " <div class=\"news-smallbox\">
<a href=\"";
// line 114
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "url", [], "any", false, false, false, 114), "html", null, true);
echo "\" ";
if ((twig_get_attribute($this->env, $this->source, $context["News"], "link_method", [], "any", false, false, false, 114) == "1")) {
echo "target=\"_blank\"";
}
echo ">
<div class=\"news-1\">
<div class=\"inter\">
";
// line 117
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IntlExtension']->date_day($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "publish_date", [], "any", false, false, false, 117)), "html", null, true);
echo "
</div>
<div class=\"\">
";
// line 121
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "title", [], "any", false, false, false, 121), "html", null, true);
echo "<span class=\"news-desc\">";
echo twig_nl2br(twig_get_attribute($this->env, $this->source, $context["News"], "description", [], "any", false, false, false, 121));
echo "</span>
</div>
</div>
</a>
</div>
";
} else {
// line 128
echo " <div class=\"news-smallbox\">
<a href=";
// line 129
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("news_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["News"], "id", [], "any", false, false, false, 129)]), "html", null, true);
echo " >
<div class=\"news-1\">
<div class=\"inter\">
";
// line 132
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\IntlExtension']->date_day($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "publish_date", [], "any", false, false, false, 132)), "html", null, true);
echo "
</div>
<div class=\"\">
";
// line 136
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["News"], "title", [], "any", false, false, false, 136), "html", null, true);
echo "<span class=\"news-desc\">詳細はこちらをクリック</span>
</div>
</div>
</a>
</div>
";
}
// line 142
echo " ";
}
// line 143
echo " </div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['News'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
}
// line 146
echo "
</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "Block/mob_list_news.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 380 => 146, 372 => 143, 369 => 142, 360 => 136, 353 => 132, 347 => 129, 344 => 128, 332 => 121, 325 => 117, 315 => 114, 312 => 113, 310 => 112, 307 => 111, 305 => 110, 302 => 109, 298 => 108, 295 => 107, 293 => 106, 279 => 105, 274 => 103, 271 => 102, 253 => 101, 250 => 99, 243 => 94, 236 => 92, 233 => 91, 224 => 85, 217 => 81, 211 => 78, 208 => 77, 196 => 70, 189 => 66, 179 => 63, 176 => 62, 173 => 61, 171 => 60, 168 => 59, 164 => 58, 158 => 54, 156 => 53, 142 => 52, 137 => 50, 134 => 49, 116 => 48, 111 => 45, 106 => 42, 103 => 40, 101 => 39, 97 => 37, 95 => 36, 93 => 35, 86 => 30, 84 => 29, 81 => 28, 79 => 27, 75 => 25, 73 => 24, 70 => 23, 68 => 22, 66 => 21, 63 => 20, 59 => 18, 55 => 16, 53 => 15, 51 => 14, 48 => 13, 46 => 12, 43 => 11,);
}
public function getSourceContext()
{
return new Source("{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set hasCategory = false %}
{% set request_uri = app.request.server.get('REQUEST_URI') %}
{% if 'name=' in request_uri %}
{% else %}
{% set hasCategory = true %}
{% endif %}
{% if hasCategory %}
{% set RootCategory = Category.RootCategory %}
{% set NewsList = repository('Eccube\\\\Entity\\\\News').getList() %}
<!--現在のカテゴリID取得-->
{% set now_id = app.request.query.get('category_id') %}
<!--買い取り配下のカテゴリ取得-->
{% set cate_childs = RootCategory.getDescendants %}
<!--ルート表示-->
<!-- 現在カテゴリーから、親カテゴリに遡り「買い取り>ポケモンまで遡りたい」 -->
<!--現在カテゴリの上のカテゴリを取得 -->
{% set nowparent = Category.getParent() %}
{% set h = Category.hierarchy - 1 %}
<!--孫カテゴリ時に子カテゴリが表示された場合は親カテゴリへ -->
{% if nowparent == \"シュヴァルツサイド\" or nowparent == \"ヴァイスサイド\" %}
{% set nowparent = \"ヴァイスシュヴァルツ\" %}
{% endif %}
<div class=\"mob_top-content-box\">
{% if nowparent == \"ヴァイスシュヴァルツ\" or now_id == 8 or now_id == 218 %}
<h2>
{# use loop.first #}
{% for Path in Category.path %}
{% if loop.first %}
{# Path.name #}ヴァイスシュヴァルツ
{% endif %}
{% endfor %}
{# result #}
に関するニュース</h2>
<div class=\"news-box\">
{% for News in NewsList %}
{% if News.category_id == 8 %}
{% if News.url %}
<div class=\"news-smallbox\">
<a href=\"{{ News.url }}\" {% if News.link_method == '1' %}target=\"_blank\"{% endif %}>
<div class=\"news-1\">
<div class=\"inter\">
{{ News.publish_date|date_day }}
</div>
<div class=\"\">
{{ News.title }}<span class=\"news-desc\">{{ News.description|raw|nl2br }}</span>
</div>
</div>
</a>
</div>
{% else %}
<div class=\"news-smallbox\">
<a href={{ url('news_detail', {'id': News.id}) }} >
<div class=\"news-1\">
<div class=\"inter\">
{{ News.publish_date|date_day }}
</div>
<div class=\"\">
{{ News.title }}<span class=\"news-desc\">詳細はこちらをクリック</span>
</div>
</div>
</a>
</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
{% else %}
<h2>
{# use loop.first #}
{% for Path in Category.path %}
{% if loop.first %}
{# Path.name #}ポケモン
{% endif %}
{% endfor %}
{# result #}
に関するニュース</h2>
{% for News in NewsList %}
{% if News.category_id == 7 %}
{% if News.url %}
<div class=\"news-smallbox\">
<a href=\"{{ News.url }}\" {% if News.link_method == '1' %}target=\"_blank\"{% endif %}>
<div class=\"news-1\">
<div class=\"inter\">
{{ News.publish_date|date_day }}
</div>
<div class=\"\">
{{ News.title }}<span class=\"news-desc\">{{ News.description|raw|nl2br }}</span>
</div>
</div>
</a>
</div>
{% else %}
<div class=\"news-smallbox\">
<a href={{ url('news_detail', {'id': News.id}) }} >
<div class=\"news-1\">
<div class=\"inter\">
{{ News.publish_date|date_day }}
</div>
<div class=\"\">
{{ News.title }}<span class=\"news-desc\">詳細はこちらをクリック</span>
</div>
</div>
</a>
</div>
{% endif %}
{% endif %}
</div>
{% endfor %}
{% endif %}
</div>
{% endif %}", "Block/mob_list_news.twig", "/home/northserver/tcg-mana.com/public_html/app/template/default/Block/mob_list_news.twig");
}
}