<?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;
/* @user_data/topic.twig */
class __TwigTemplate_7f91b49a97e56bb4f84237eaaad039b09a728e3bc389a66d7bdb45ba96194bed extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'main' => [$this, 'block_main'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return "default_frame.twig";
}
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", "@user_data/topic.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@user_data/topic.twig"));
$this->parent = $this->loadTemplate("default_frame.twig", "@user_data/topic.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 2
public function block_main($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(), "block", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 3
echo " ";
echo $this->extensions['Eccube\Twig\Extension\IgnoreTwigSandboxErrorExtension']->twig_include($this->env, $context, "Block/banner.twig", ["image" => $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/topic.png", "user_data"), "title" => "TOPICS", "subtitle" => "トピックス"]);
echo "
<div class=\"topic\">
<div class=\"topic__container\">
<div class=\"topic__list\">
";
// line 7
if ((twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 7, $this->source); })()), "totalItemCount", [], "any", false, false, true, 7) > 0)) {
// line 8
echo " <div class=\"topic__list__inner\">
";
// line 9
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 9, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Blog"]) {
// line 10
echo " <a class=\"topic__post\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("topic_detail", ["id" => ((twig_get_attribute($this->env, $this->source, $context["Blog"], "slug", [], "any", false, false, true, 10)) ? (twig_get_attribute($this->env, $this->source, $context["Blog"], "slug", [], "any", false, false, true, 10)) : (twig_get_attribute($this->env, $this->source, $context["Blog"], "id", [], "any", false, false, true, 10)))]), "html", null, true);
echo "\">
<div class=\"topic__post__image\">
<img src=\"";
// line 12
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->extensions['Eccube\Twig\Extension\EccubeExtension']->getNoImageProduct($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Blog"], "getMainListImage", [], "any", false, false, true, 12), 12, $this->source)), "save_image"), "html", null, true);
echo "\" />
</div>
<div class=\"topic__post__content\">
<h2 class=\"topic__post__title\">
";
// line 16
(((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Blog"], "getTitle", [], "any", false, false, true, 16)) > 45)) ? (print (twig_escape_filter($this->env, (twig_slice($this->env, twig_replace_filter(twig_striptags(twig_get_attribute($this->env, $this->source, $context["Blog"], "getTitle", [], "any", false, false, true, 16)), [" " => " "]), 0, 45) . "..."), "html", null, true))) : (print (twig_get_attribute($this->env, $this->source, $context["Blog"], "getTitle", [], "any", false, false, true, 16))));
echo "
</h2>
<p class=\"topic__post__date\">
";
// line 19
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Blog"], "release_date", [], "any", false, false, true, 19), 19, $this->source), "Y年m月d日"), "html", null, true);
echo "
</p>
<p class=\"topic__post__desc\">
";
// line 22
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Blog"], "getFigCaption", [], "any", false, false, true, 22), 22, $this->source), "html", null, true);
echo "
</p>
</div>
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Blog'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 27
echo " </div>
<div class=\"ec-pagerRole\">
";
// line 29
$this->loadTemplate("pager.twig", "@user_data/topic.twig", 29)->display(twig_array_merge($context, ["pages" => twig_get_attribute($this->env, $this->source, (isset($context["pagination"]) || array_key_exists("pagination", $context) ? $context["pagination"] : (function () { throw new RuntimeError('Variable "pagination" does not exist.', 29, $this->source); })()), "paginationData", [], "any", false, false, true, 29), "routes" => "topic"]));
// line 30
echo " </div>
";
}
// line 32
echo " </div>
<div class=\"topic__archive\">
<div class=\"topic__archive__title\">
月別アーカイブ
</div>
<div class=\"topic__archive__list\">
";
// line 38
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["monthArr"]) || array_key_exists("monthArr", $context) ? $context["monthArr"] : (function () { throw new RuntimeError('Variable "monthArr" does not exist.', 38, $this->source); })()));
foreach ($context['_seq'] as $context["key"] => $context["month"]) {
// line 39
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("topic", ["date" => $context["key"]]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed($context["month"], 39, $this->source), "html", null, true);
echo "</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['key'], $context['month'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 41
echo " </div>
</div>
</div>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@user_data/topic.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 156 => 41, 145 => 39, 141 => 38, 133 => 32, 129 => 30, 127 => 29, 123 => 27, 112 => 22, 106 => 19, 100 => 16, 93 => 12, 87 => 10, 83 => 9, 80 => 8, 78 => 7, 70 => 3, 60 => 2, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'default_frame.twig' %}
{% block main %}
{{ include('Block/banner.twig', { 'image': asset('assets/img/topic.png', \"user_data\"), 'title': 'TOPICS', 'subtitle': 'トピックス' }) }}
<div class=\"topic\">
<div class=\"topic__container\">
<div class=\"topic__list\">
{% if pagination.totalItemCount > 0 %}
<div class=\"topic__list__inner\">
{% for Blog in pagination %}
<a class=\"topic__post\" href=\"{{ url('topic_detail', {'id': Blog.slug ? Blog.slug : Blog.id}) }}\">
<div class=\"topic__post__image\">
<img src=\"{{ asset(Blog.getMainListImage|no_image_product, 'save_image') }}\" />
</div>
<div class=\"topic__post__content\">
<h2 class=\"topic__post__title\">
{{ Blog.getTitle|length > 45 ? Blog.getTitle|striptags|replace({(' '):' '})|slice(0, 45)|raw ~ '...' : Blog.getTitle|raw }}
</h2>
<p class=\"topic__post__date\">
{{ Blog.release_date|date('Y年m月d日')}}
</p>
<p class=\"topic__post__desc\">
{{ Blog.getFigCaption }}
</p>
</div>
</a>
{% endfor %}
</div>
<div class=\"ec-pagerRole\">
{% include \"pager.twig\" with {'pages': pagination.paginationData, 'routes' : 'topic'} %}
</div>
{% endif %}
</div>
<div class=\"topic__archive\">
<div class=\"topic__archive__title\">
月別アーカイブ
</div>
<div class=\"topic__archive__list\">
{% for key, month in monthArr %}
<a href=\"{{ url('topic', {date: key}) }}\">{{ month }}</a>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}", "@user_data/topic.twig", "/home/cpartners/cpartners.xbiz.jp/public_html/app/template/user_data/topic.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 7, "for" => 9, "include" => 29);
static $filters = array("escape" => 10, "no_image_product" => 12, "length" => 16, "raw" => 16, "slice" => 16, "replace" => 16, "striptags" => 16, "date" => 19);
static $functions = array("include" => 3, "asset" => 3, "url" => 10);
try {
$this->sandbox->checkSecurity(
['if', 'for', 'include'],
['escape', 'no_image_product', 'length', 'raw', 'slice', 'replace', 'striptags', 'date'],
['include', 'asset', 'url']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}