<?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;
/* Recipe/Resource/template/default/index.twig */
class __TwigTemplate_dac34a8da39b2733c000ace70057c179fed2b7b018ac41c5e44d23b7ab02e5aa extends \Eccube\Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheet' => [$this, 'block_stylesheet'],
'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", "Recipe/Resource/template/default/index.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Recipe/Resource/template/default/index.twig"));
$this->parent = $this->loadTemplate("default_frame.twig", "Recipe/Resource/template/default/index.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_stylesheet($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", "stylesheet"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
// line 4
echo " <link rel=\"stylesheet\" href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("Recipe/assets/default/css/recipe.css", "plugin"), "html", null, true);
echo "\">
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 7
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 8
echo "<section class=\"p-lower-mv\">
<div class=\"inner\">
<h2 class=\"p-lower-mv-title\"><span>レシピ一覧</span></h2>
<div class=\"under bread_wrap\">
<ol itemscope itemtype=\"https://schema.org/BreadcrumbList\">
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"";
// line 14
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("homepage");
echo "\">
<span class=\"freight-neo-pro\" itemprop=\"name\">TOP</span>
</a>
<meta itemprop=\"position\" content=\"1\" />
</li>
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"";
// line 20
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("recipe");
echo "\">
<span class=\"freight-neo-pro\" itemprop=\"name\">レシピ一覧</span>
</a>
<meta itemprop=\"position\" content=\"2\" />
</li>
</ol>
</div>
<!-- /.bread_wrap -->
</div>
</section>
";
// line 31
$this->loadTemplate("@Recipe/default/recipe_search.twig", "Recipe/Resource/template/default/index.twig", 31)->display(twig_array_merge($context, ["search_form" => (isset($context["search_form"]) || array_key_exists("search_form", $context) ? $context["search_form"] : (function () { throw new RuntimeError('Variable "search_form" does not exist.', 31, $this->source); })())]));
// line 32
echo "
<section class=\"recipe\">
<div class=\"inner\">
<!-- <p class=\"preparation\">ただいま準備中です。</p> -->
<article class=\"recipe-article\">
<div class=\"recipe-article-head\">
<h3 class=\"recipe-article-title\">";
// line 38
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["subtitle"]) || array_key_exists("subtitle", $context) ? $context["subtitle"] : (function () { throw new RuntimeError('Variable "subtitle" does not exist.', 38, $this->source); })()), 38, $this->source), "html", null, true);
echo "</h3>
<div class=\"recipe-search-result\"><span class=\"number\">";
// line 39
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 39, $this->source); })()), "totalItemCount", [], "any", false, false, true, 39), 39, $this->source), "html", null, true);
echo "</span>件</div>
<div class=\"recipe-switch\">
";
// line 41
if ((isset($context["filterFlg"]) || array_key_exists("filterFlg", $context) ? $context["filterFlg"] : (function () { throw new RuntimeError('Variable "filterFlg" does not exist.', 41, $this->source); })())) {
// line 42
echo " <a href=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("recipe");
echo "\" class=\"is-active\">絞り込み解除</a>
";
}
// line 44
echo " </div>
</div>
<div class=\"recipe-article-body\">
<ul class=\"recipe-list\">
";
// line 48
$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.', 48, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["Recipe"]) {
// line 49
echo " <li class=\"recipe-item p-recipe-box\">
<a href=\"";
// line 50
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("recipe_detail", ["id" => twig_get_attribute($this->env, $this->source, $context["Recipe"], "id", [], "any", false, false, true, 50)]), "html", null, true);
echo "\">
<div class=\"recipe-head\">
";
// line 52
if (((((twig_get_attribute($this->env, $this->source, $context["Recipe"], "RecipeBadge", [], "any", true, true, true, 52) && !(null === twig_get_attribute($this->env, $this->source, // line 53
$context["Recipe"], "RecipeBadge", [], "any", false, false, true, 53))) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 54
$context["Recipe"], "RecipeBadge", [], "any", false, true, true, 54), "name", [], "any", true, true, true, 54)) && !(null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 55
$context["Recipe"], "RecipeBadge", [], "any", false, false, true, 55), "name", [], "any", false, false, true, 55))) && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 56
$context["Recipe"], "RecipeBadge", [], "any", false, false, true, 56), "filename", [], "any", false, false, true, 56) != ""))) {
// line 57
echo " <div class=\"recipe-badge\">
<img
src=\"";
// line 59
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, twig_get_attribute($this->env, $this->source, $context["Recipe"], "RecipeBadge", [], "any", false, false, true, 59), "filename", [], "any", false, false, true, 59), 59, $this->source)), "save_image"), "html", null, true);
echo "\"
alt=\"";
// line 60
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["Recipe"], "RecipeBadge", [], "any", false, false, true, 60), "name", [], "any", false, false, true, 60), 60, $this->source), "html", null, true);
echo "\">
</div>
";
}
// line 63
echo " <img
src=\"";
// line 64
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["Recipe"], "mainListImage", [], "any", false, false, true, 64), 64, $this->source)), "save_image"), "html", null, true);
echo "\"
alt=\"";
// line 65
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Recipe"], "name", [], "any", false, false, true, 65), 65, $this->source), "html", null, true);
echo "\">
</div>
<div class=\"recipe-body\">
<h3 class=\"recipe-name\">";
// line 68
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Recipe"], "name", [], "any", false, false, true, 68), 68, $this->source), "html", null, true);
echo "</h3>
";
// line 69
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["Recipe"], "RelatedProducts", [], "any", false, false, true, 69)) > 0)) {
// line 70
echo " <p class=\"recipe-product\">使用した商品:";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["Recipe"], "RelatedProducts", [], "any", false, false, true, 70), 0, [], "array", false, false, true, 70), "ChildProduct", [], "any", false, false, true, 70), "name", [], "any", false, false, true, 70), 70, $this->source), "html", null, true);
echo "</p>
";
}
// line 72
echo " <div class=\"recipe-wrap\">
<p class=\"recipe-time\"><span>";
// line 73
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Recipe"], "minute", [], "any", false, false, true, 73), 73, $this->source), "html", null, true);
echo "</span>分</p>
<p class=\"recipe-calorie\"><span>";
// line 74
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["Recipe"], "energy", [], "any", false, false, true, 74), 74, $this->source), "html", null, true);
echo "</span>kcal</p>
</div>
<ul class=\"recipe-tag-list\">
";
// line 77
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Recipe"], "tags", [], "any", false, false, true, 77));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
// line 78
echo " <li class=\"recipe-tag-item\">♯";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["tag"], "name", [], "any", false, false, true, 78), 78, $this->source), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['tag'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 80
echo " </ul>
<ul class=\"material-list\">
";
// line 82
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Recipe"], "categorys", [], "any", false, false, true, 82));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 83
echo " <li class=\"material-item\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, true, 83), 83, $this->source), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['category'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 85
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["Recipe"], "materials", [], "any", false, false, true, 85));
foreach ($context['_seq'] as $context["_key"] => $context["material"]) {
// line 86
echo " <li class=\"material-item\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["material"], "name", [], "any", false, false, true, 86), 86, $this->source), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['material'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 88
echo " </ul>
</div>
</a>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['Recipe'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 93
echo " </ul>
</div>
<div class=\"p-pagination\">
";
// line 96
$this->loadTemplate("@Recipe/default/pager.twig", "Recipe/Resource/template/default/index.twig", 96)->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.', 96, $this->source); })()), "paginationData", [], "any", false, false, true, 96)]));
// line 97
echo " </div>
</article>
</div>
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "Recipe/Resource/template/default/index.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 289 => 97, 287 => 96, 282 => 93, 272 => 88, 263 => 86, 258 => 85, 249 => 83, 245 => 82, 241 => 80, 232 => 78, 228 => 77, 222 => 74, 218 => 73, 215 => 72, 209 => 70, 207 => 69, 203 => 68, 197 => 65, 193 => 64, 190 => 63, 184 => 60, 180 => 59, 176 => 57, 174 => 56, 173 => 55, 172 => 54, 171 => 53, 170 => 52, 165 => 50, 162 => 49, 158 => 48, 152 => 44, 146 => 42, 144 => 41, 139 => 39, 135 => 38, 127 => 32, 125 => 31, 111 => 20, 102 => 14, 94 => 8, 84 => 7, 71 => 4, 61 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'default_frame.twig' %}
{% block stylesheet %}
<link rel=\"stylesheet\" href=\"{{ asset('Recipe/assets/default/css/recipe.css' , 'plugin') }}\">
{% endblock stylesheet %}
{% block main %}
<section class=\"p-lower-mv\">
<div class=\"inner\">
<h2 class=\"p-lower-mv-title\"><span>レシピ一覧</span></h2>
<div class=\"under bread_wrap\">
<ol itemscope itemtype=\"https://schema.org/BreadcrumbList\">
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"{{ url('homepage') }}\">
<span class=\"freight-neo-pro\" itemprop=\"name\">TOP</span>
</a>
<meta itemprop=\"position\" content=\"1\" />
</li>
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"{{ url('recipe') }}\">
<span class=\"freight-neo-pro\" itemprop=\"name\">レシピ一覧</span>
</a>
<meta itemprop=\"position\" content=\"2\" />
</li>
</ol>
</div>
<!-- /.bread_wrap -->
</div>
</section>
{% include \"@Recipe/default/recipe_search.twig\" with {'search_form': search_form} %}
<section class=\"recipe\">
<div class=\"inner\">
<!-- <p class=\"preparation\">ただいま準備中です。</p> -->
<article class=\"recipe-article\">
<div class=\"recipe-article-head\">
<h3 class=\"recipe-article-title\">{{ subtitle }}</h3>
<div class=\"recipe-search-result\"><span class=\"number\">{{ pagination.totalItemCount }}</span>件</div>
<div class=\"recipe-switch\">
{% if filterFlg %}
<a href=\"{{ url('recipe') }}\" class=\"is-active\">絞り込み解除</a>
{% endif %}
</div>
</div>
<div class=\"recipe-article-body\">
<ul class=\"recipe-list\">
{% for Recipe in pagination %}
<li class=\"recipe-item p-recipe-box\">
<a href=\"{{ url('recipe_detail', {'id': Recipe.id}) }}\">
<div class=\"recipe-head\">
{% if Recipe.RecipeBadge is defined and
Recipe.RecipeBadge is not null and
Recipe.RecipeBadge.name is defined and
Recipe.RecipeBadge.name is not null and
Recipe.RecipeBadge.filename != '' %}
<div class=\"recipe-badge\">
<img
src=\"{{ asset(Recipe.RecipeBadge.filename|no_image_product, 'save_image') }}\"
alt=\"{{ Recipe.RecipeBadge.name }}\">
</div>
{% endif %}
<img
src=\"{{ asset(Recipe.mainListImage|no_image_product, 'save_image') }}\"
alt=\"{{ Recipe.name }}\">
</div>
<div class=\"recipe-body\">
<h3 class=\"recipe-name\">{{ Recipe.name }}</h3>
{% if Recipe.RelatedProducts|length > 0 %}
<p class=\"recipe-product\">使用した商品:{{ Recipe.RelatedProducts[0].ChildProduct.name }}</p>
{% endif %}
<div class=\"recipe-wrap\">
<p class=\"recipe-time\"><span>{{ Recipe.minute }}</span>分</p>
<p class=\"recipe-calorie\"><span>{{ Recipe.energy }}</span>kcal</p>
</div>
<ul class=\"recipe-tag-list\">
{% for tag in Recipe.tags %}
<li class=\"recipe-tag-item\">♯{{ tag.name }}</li>
{% endfor %}
</ul>
<ul class=\"material-list\">
{% for category in Recipe.categorys %}
<li class=\"material-item\">{{ category.name }}</li>
{% endfor %}
{% for material in Recipe.materials %}
<li class=\"material-item\">{{ material.name }}</li>
{% endfor %}
</ul>
</div>
</a>
</li>
{% endfor %}
</ul>
</div>
<div class=\"p-pagination\">
{% include \"@Recipe/default/pager.twig\" with {'pages': pagination.paginationData} %}
</div>
</article>
</div>
</section>
{% endblock %}
", "Recipe/Resource/template/default/index.twig", "/var/www/html/app/template/default/Recipe/Resource/template/default/index.twig");
}
public function checkSecurity()
{
static $tags = array("include" => 31, "if" => 41, "for" => 48);
static $filters = array("escape" => 4, "no_image_product" => 59, "length" => 69);
static $functions = array("asset" => 4, "url" => 14);
try {
$this->sandbox->checkSecurity(
['include', 'if', 'for'],
['escape', 'no_image_product', 'length'],
['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;
}
}
}