<?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/detail.twig */
class __TwigTemplate_a2c2c699bdad4eb9593e5a31bd3eacbc 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'],
'javascript' => [$this, 'block_javascript'],
'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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Recipe/Resource/template/default/detail.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Recipe/Resource/template/default/detail.twig"));
$this->parent = $this->loadTemplate("default_frame.twig", "Recipe/Resource/template/default/detail.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_stylesheet($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheet"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_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_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 6
public function block_javascript($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascript"));
// line 7
echo " <script type=\"text/javascript\" src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("Recipe/assets/default/js/detail.js", "plugin"), "html", null, true);
echo "\"></script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 10
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 11
echo "<section class=\"p-lower-mv\">
<div class=\"inner\">
<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 16
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 22
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>
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"";
// line 28
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("recipe_detail", ["id" => twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 28, $this->source); })()), "id", [], "any", false, false, true, 28)]), "html", null, true);
echo "\">
<span class=\"freight-neo-pro\" itemprop=\"name\">";
// line 29
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 29, $this->source); })()), "name", [], "any", false, false, true, 29), 29, $this->source), "html", null, true);
echo "</span>
</a>
<meta itemprop=\"position\" content=\"3\" />
</li>
</ol>
</div>
<!-- /.bread_wrap -->
</div>
</section>
<section class=\"recipe-detail\">
<div class=\"inner\">
<article class=\"recipe-detail-article\">
<h2 class=\"recipe-title\">";
// line 41
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 41, $this->source); })()), "name", [], "any", false, false, true, 41), 41, $this->source), "html", null, true);
echo "</h2>
<div class=\"recipe-detail-article-head\">
<div>
<div class=\"swiper recipe-detail-swiper recipe-image\">
<div class=\"swiper-wrapper\">
";
// line 46
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 46, $this->source); })()), "RecipeImage", [], "any", false, false, true, 46)) == 0)) {
// line 47
echo " <div class=\"swiper-slide recipe-detail-slide\">
<img src=\"";
// line 48
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, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 48, $this->source); })()), "mainListImage", [], "any", false, false, true, 48), 48, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 48, $this->source); })()), "name", [], "any", false, false, true, 48), 48, $this->source), "html", null, true);
echo "\">
</div>
";
} else {
// line 51
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 51, $this->source); })()), "RecipeImage", [], "any", false, false, true, 51));
foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
// line 52
echo " <div class=\"swiper-slide recipe-detail-slide\">
";
// line 53
if (((twig_last($this->env, twig_split_filter($this->env, twig_get_attribute($this->env, $this->source, $context["image"], "filename", [], "any", false, false, true, 53), ".")) == "mp4") || (twig_last($this->env, twig_split_filter($this->env, twig_get_attribute($this->env, $this->source, $context["image"], "filename", [], "any", false, false, true, 53), ".")) == "mov"))) {
// line 54
echo " <div class=\"recipe-detail-slide-video\">
<video src=\"";
// line 55
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["image"], "filename", [], "any", false, false, true, 55), 55, $this->source), "save_image"), "html", null, true);
echo "\" controls></video>
</div>
";
} else {
// line 58
echo " <img src=\"";
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["image"], "filename", [], "any", false, false, true, 58), 58, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 58, $this->source); })()), "name", [], "any", false, false, true, 58), 58, $this->source), "html", null, true);
echo "\">
";
}
// line 60
echo " </div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 62
echo " ";
}
// line 63
echo " </div>
</div>
<div class=\"recipe-detail-swiper-pagination\">
<div class=\"swiper-pagination\"></div>
</div>
</div>
<div class=\"recipe-info\">
<div class=\"recipe-time\">
<div class=\"recipe-info-head\">
<div class=\"recipe-icon\">調理時間</div>
</div>
<p class=\"recipe-info-body\"><span class=\"number\">";
// line 74
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 74, $this->source); })()), "minute", [], "any", false, false, true, 74), 74, $this->source), "html", null, true);
echo "</span>分</p>
</div>
<div class=\"recipe-calorie\">
<div class=\"recipe-info-head\">
<div class=\"recipe-icon\">エネルギー</div>
</div>
<p class=\"recipe-info-body\"><span class=\"number\">";
// line 80
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 80, $this->source); })()), "energy", [], "any", false, false, true, 80), 80, $this->source), "html", null, true);
echo "</span>kcal</p>
</div>
<div class=\"recipe-label\">
<ul class=\"recipe-label-list\">
";
// line 84
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 84, $this->source); })()), "categorys", [], "any", false, false, true, 84));
foreach ($context['_seq'] as $context["_key"] => $context["category"]) {
// line 85
echo " <li class=\"recipe-label-item\">
<a href=\"";
// line 86
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("recipe");
echo "?category_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["category"], "id", [], "any", false, false, true, 86), 86, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["category"], "name", [], "any", false, false, true, 86), 86, $this->source), "html", null, true);
echo "</a>
</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 89
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 89, $this->source); })()), "materials", [], "any", false, false, true, 89));
foreach ($context['_seq'] as $context["_key"] => $context["material"]) {
// line 90
echo " <li class=\"recipe-label-item\">
<a href=\"";
// line 91
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("recipe");
echo "?material_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["material"], "id", [], "any", false, false, true, 91), 91, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["material"], "name", [], "any", false, false, true, 91), 91, $this->source), "html", null, true);
echo "</a>
</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 94
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 94, $this->source); })()), "tags", [], "any", false, false, true, 94));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
// line 95
echo " <li class=\"recipe-label-item\">
<a href=\"";
// line 96
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("recipe");
echo "?tag_id=";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, true, 96), 96, $this->source), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["tag"], "name", [], "any", false, false, true, 96), 96, $this->source), "html", null, true);
echo "</a>
</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 99
echo " </ul>
</div>
</div>
</div>
";
// line 103
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 103, $this->source); })()), "RecipeMaterialInfos", [], "any", false, false, true, 103)) > 0)) {
// line 104
echo " <div class=\"recipe-detail-article-body\">
<div class=\"recipe-material\">
<h3 class=\"recipe-box-title\">材料
";
// line 107
if (twig_get_attribute($this->env, $this->source, ($context["Recipe"] ?? null), "people", [], "any", true, true, true, 107)) {
// line 108
echo " <span>(";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 108, $this->source); })()), "people", [], "any", false, false, true, 108), 108, $this->source), "html", null, true);
echo "人分)</span>
";
}
// line 110
echo " </h3>
";
// line 111
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 111, $this->source); })()), "RecipeMaterialInfos", [], "any", false, false, true, 111));
foreach ($context['_seq'] as $context["_key"] => $context["info"]) {
// line 112
echo " <dl class=\"recipe-material-list\">
<dt class=\"recipe-material-title\">";
// line 113
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["info"], "title", [], "any", false, false, true, 113), 113, $this->source), "html", null, true);
echo "</dt>
<dd class=\"recipe-material-desc\">";
// line 114
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["info"], "content", [], "any", false, false, true, 114), 114, $this->source), "html", null, true);
echo "</dd>
</dl>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['info'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 117
echo " </div>
";
}
// line 119
echo " ";
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 119, $this->source); })()), "RecipeSteps", [], "any", false, false, true, 119)) > 0)) {
// line 120
echo " <div class=\"recipe-howto\">
<h3 class=\"recipe-box-title\">作り方</h3>
<ol class=\"recipe-howto-list\">
";
// line 123
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 123, $this->source); })()), "RecipeSteps", [], "any", false, false, true, 123));
$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["info"]) {
// line 124
echo " <li class=\"recipe-howto-item\">
<span>";
// line 125
echo twig_escape_filter($this->env, twig_sprintf("%02d", $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, true, 125), 125, $this->source)), "html", null, true);
echo "</span>
<div class=\"recipe-howto-list__content\">
";
// line 127
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["info"], "content", [], "any", false, false, true, 127), 127, $this->source);
echo "
</div>
</li>
";
++$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['info'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 131
echo " </ol>
</div>
</div>
";
}
// line 135
echo " ";
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 135, $this->source); })()), "RecipeNutritions", [], "any", false, false, true, 135)) > 0)) {
// line 136
echo " <div class=\"recipe-component\">
<h3 class=\"recipe-box-title\">1食あたりの栄養成分</h3>
<ul class=\"recipe-component-list\">
";
// line 139
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 139, $this->source); })()), "RecipeNutritions", [], "any", false, false, true, 139));
foreach ($context['_seq'] as $context["_key"] => $context["info"]) {
// line 140
echo " <li class=\"recipe-component-item\">
<p class=\"recipe-component-title\">";
// line 141
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["info"], "title", [], "any", false, false, true, 141), 141, $this->source), "html", null, true);
echo "</p>
<p class=\"recipe-component-number\"><span>";
// line 142
echo twig_escape_filter($this->env, twig_sprintf("%.1f", $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["info"], "amount", [], "any", false, false, true, 142), 142, $this->source)), "html", null, true);
echo "</span>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["info"], "unit", [], "any", false, false, true, 142), 142, $this->source), "html", null, true);
echo "</p>
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['info'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 145
echo " </ul>
</div>
";
}
// line 148
echo " ";
if ((((((twig_get_attribute($this->env, $this->source, ($context["Recipe"] ?? null), "RecipeCreator", [], "any", true, true, true, 148) && !(null === twig_get_attribute($this->env, $this->source, // line 149
(isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 149, $this->source); })()), "RecipeCreator", [], "any", false, false, true, 149))) && twig_get_attribute($this->env, $this->source, // line 150
($context["Recipe"] ?? null), "CreatorHeading", [], "any", true, true, true, 150)) && !(null === twig_get_attribute($this->env, $this->source, // line 151
(isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 151, $this->source); })()), "CreatorHeading", [], "any", false, false, true, 151))) && twig_get_attribute($this->env, $this->source, // line 152
($context["Recipe"] ?? null), "CreatorComment", [], "any", true, true, true, 152)) && !(null === twig_get_attribute($this->env, $this->source, // line 153
(isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 153, $this->source); })()), "CreatorComment", [], "any", false, false, true, 153)))) {
// line 155
echo " <div class=\"recipe-comment\">
<div class=\"recipe-comment-sticky\"><img src=\"";
// line 156
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/recipe/img-sticky.png", "user_data"), "html", null, true);
echo "\" alt=\"\"></div>
<div class=\"recipe-comment-head\">
<figure class=\"recipe-comment-picture\">
<img src=\"";
// line 159
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, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 159, $this->source); })()), "RecipeCreator", [], "any", false, false, true, 159), "filename", [], "any", false, false, true, 159), 159, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 159, $this->source); })()), "RecipeCreator", [], "any", false, false, true, 159), "name", [], "any", false, false, true, 159), 159, $this->source), "html", null, true);
echo "\">
<figcaption>";
// line 160
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 160, $this->source); })()), "RecipeCreator", [], "any", false, false, true, 160), "title", [], "any", false, false, true, 160), 160, $this->source), "html", null, true);
echo "<span class=\"name\">";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 160, $this->source); })()), "RecipeCreator", [], "any", false, false, true, 160), "name", [], "any", false, false, true, 160), 160, $this->source), "html", null, true);
echo "</span></figcaption>
</figure>
</div>
<div class=\"recipe-comment-body\">
<p class=\"recipe-comment-title\">";
// line 164
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 164, $this->source); })()), "CreatorHeading", [], "any", false, false, true, 164), 164, $this->source), "html", null, true);
echo "</p>
<p class=\"recipe-comment-text\">";
// line 165
echo twig_nl2br($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 165, $this->source); })()), "CreatorComment", [], "any", false, false, true, 165), 165, $this->source));
echo "</p>
</div>
</div>
";
}
// line 169
echo " </article>
</div>
</section>
";
// line 173
if ((twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 173, $this->source); })()), "getEnableRelatedProducts", [], "any", false, false, true, 173)) > 0)) {
// line 174
echo "<section class=\"p-section bg-gray recipe-product\">
<div class=\"inner\">
<h2 class=\"p-title icon-top\"><span>このレシピに<br class=\"sp\">使われている商品</span></h2>
<div class=\"recipe-product-wrap\">
<div class=\"swiper recipe-product-swiper\">
<div class=\"swiper-wrapper\">
";
// line 180
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["Recipe"]) || array_key_exists("Recipe", $context) ? $context["Recipe"] : (function () { throw new RuntimeError('Variable "Recipe" does not exist.', 180, $this->source); })()), "RelatedProducts", [], "any", false, false, true, 180));
foreach ($context['_seq'] as $context["_key"] => $context["RelatedProduct"]) {
// line 181
echo " <div class=\"swiper-slide recipe-product-slide\">
<a href=\"";
// line 182
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("product_detail", ["id" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RelatedProduct"], "ChildProduct", [], "any", false, false, true, 182), "id", [], "any", false, false, true, 182)]), "html", null, true);
echo "\">
<div class=\"recipe-product-item-head\">
<img src=\"";
// line 184
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["RelatedProduct"], "ChildProduct", [], "any", false, false, true, 184), "main_list_image", [], "any", false, false, true, 184), 184, $this->source)), "save_image"), "html", null, true);
echo "\" alt=\"\">
</div>
<div class=\"recipe-product-item-body\">
<h3 class=\"recipe-product-item-name\">";
// line 187
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RelatedProduct"], "ChildProduct", [], "any", false, false, true, 187), "name", [], "any", false, false, true, 187), 187, $this->source), "html", null, true);
echo "</h3>
<p class=\"recipe-product-item-desc\">";
// line 188
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RelatedProduct"], "ChildProduct", [], "any", false, false, true, 188), "description_detail", [], "any", false, false, true, 188), 188, $this->source), "html", null, true);
echo "</p>
<p class=\"recipe-product-item-price\">";
// line 189
echo twig_escape_filter($this->env, $this->extensions['Eccube\Twig\Extension\EccubeExtension']->getPriceFilter($this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["RelatedProduct"], "ChildProduct", [], "any", false, false, true, 189), "getPrice02Min", [], "any", false, false, true, 189), 189, $this->source)), "html", null, true);
echo "<span>円(税抜)</span></p>
</div>
</a>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['RelatedProduct'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 194
echo " </div>
</div>
<div class=\"swiper-button-prev\"></div>
<div class=\"swiper-button-next\"></div>
</div>
</div>
</section>
";
}
// line 202
echo "
";
// line 203
$this->loadTemplate("@Recipe/default/recipe_search.twig", "Recipe/Resource/template/default/detail.twig", 203)->display($context);
// line 204
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "Recipe/Resource/template/default/detail.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 562 => 204, 560 => 203, 557 => 202, 547 => 194, 536 => 189, 532 => 188, 528 => 187, 522 => 184, 517 => 182, 514 => 181, 510 => 180, 502 => 174, 500 => 173, 494 => 169, 487 => 165, 483 => 164, 474 => 160, 468 => 159, 462 => 156, 459 => 155, 457 => 153, 456 => 152, 455 => 151, 454 => 150, 453 => 149, 451 => 148, 446 => 145, 435 => 142, 431 => 141, 428 => 140, 424 => 139, 419 => 136, 416 => 135, 410 => 131, 392 => 127, 387 => 125, 384 => 124, 367 => 123, 362 => 120, 359 => 119, 355 => 117, 346 => 114, 342 => 113, 339 => 112, 335 => 111, 332 => 110, 326 => 108, 324 => 107, 319 => 104, 317 => 103, 311 => 99, 298 => 96, 295 => 95, 290 => 94, 277 => 91, 274 => 90, 269 => 89, 256 => 86, 253 => 85, 249 => 84, 242 => 80, 233 => 74, 220 => 63, 217 => 62, 210 => 60, 202 => 58, 196 => 55, 193 => 54, 191 => 53, 188 => 52, 183 => 51, 175 => 48, 172 => 47, 170 => 46, 162 => 41, 147 => 29, 143 => 28, 134 => 22, 125 => 16, 118 => 11, 108 => 10, 95 => 7, 85 => 6, 72 => 4, 62 => 3, 39 => 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 javascript %}
<script type=\"text/javascript\" src=\"{{ asset('Recipe/assets/default/js/detail.js', 'plugin') }}\"></script>
{% endblock javascript %}
{% block main %}
<section class=\"p-lower-mv\">
<div class=\"inner\">
<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>
<li itemprop=\"itemListElement\" itemscope itemtype=\"https://schema.org/ListItem\">
<a itemprop=\"item\" href=\"{{ url('recipe_detail', { 'id': Recipe.id }) }}\">
<span class=\"freight-neo-pro\" itemprop=\"name\">{{ Recipe.name }}</span>
</a>
<meta itemprop=\"position\" content=\"3\" />
</li>
</ol>
</div>
<!-- /.bread_wrap -->
</div>
</section>
<section class=\"recipe-detail\">
<div class=\"inner\">
<article class=\"recipe-detail-article\">
<h2 class=\"recipe-title\">{{ Recipe.name }}</h2>
<div class=\"recipe-detail-article-head\">
<div>
<div class=\"swiper recipe-detail-swiper recipe-image\">
<div class=\"swiper-wrapper\">
{% if Recipe.RecipeImage|length == 0 %}
<div class=\"swiper-slide recipe-detail-slide\">
<img src=\"{{ asset(Recipe.mainListImage|no_image_product, 'save_image') }}\" alt=\"{{ Recipe.name }}\">
</div>
{% else %}
{% for image in Recipe.RecipeImage %}
<div class=\"swiper-slide recipe-detail-slide\">
{% if image.filename|split('.')|last == 'mp4' or image.filename|split('.')|last == 'mov' %}
<div class=\"recipe-detail-slide-video\">
<video src=\"{{ asset(image.filename, 'save_image') }}\" controls></video>
</div>
{% else %}
<img src=\"{{ asset(image.filename|no_image_product, 'save_image') }}\" alt=\"{{ Recipe.name }}\">
{% endif %}
</div>
{% endfor %}
{% endif %}
</div>
</div>
<div class=\"recipe-detail-swiper-pagination\">
<div class=\"swiper-pagination\"></div>
</div>
</div>
<div class=\"recipe-info\">
<div class=\"recipe-time\">
<div class=\"recipe-info-head\">
<div class=\"recipe-icon\">調理時間</div>
</div>
<p class=\"recipe-info-body\"><span class=\"number\">{{ Recipe.minute }}</span>分</p>
</div>
<div class=\"recipe-calorie\">
<div class=\"recipe-info-head\">
<div class=\"recipe-icon\">エネルギー</div>
</div>
<p class=\"recipe-info-body\"><span class=\"number\">{{ Recipe.energy }}</span>kcal</p>
</div>
<div class=\"recipe-label\">
<ul class=\"recipe-label-list\">
{% for category in Recipe.categorys %}
<li class=\"recipe-label-item\">
<a href=\"{{ url('recipe') }}?category_id={{ category.id }}\">{{ category.name }}</a>
</li>
{% endfor %}
{% for material in Recipe.materials %}
<li class=\"recipe-label-item\">
<a href=\"{{ url('recipe') }}?material_id={{ material.id }}\">{{ material.name }}</a>
</li>
{% endfor %}
{% for tag in Recipe.tags %}
<li class=\"recipe-label-item\">
<a href=\"{{ url('recipe') }}?tag_id={{ tag.id }}\">{{ tag.name }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
{% if Recipe.RecipeMaterialInfos|length > 0 %}
<div class=\"recipe-detail-article-body\">
<div class=\"recipe-material\">
<h3 class=\"recipe-box-title\">材料
{% if Recipe.people is defined %}
<span>({{ Recipe.people }}人分)</span>
{% endif %}
</h3>
{% for info in Recipe.RecipeMaterialInfos %}
<dl class=\"recipe-material-list\">
<dt class=\"recipe-material-title\">{{ info.title }}</dt>
<dd class=\"recipe-material-desc\">{{ info.content }}</dd>
</dl>
{% endfor %}
</div>
{% endif %}
{% if Recipe.RecipeSteps|length > 0 %}
<div class=\"recipe-howto\">
<h3 class=\"recipe-box-title\">作り方</h3>
<ol class=\"recipe-howto-list\">
{% for info in Recipe.RecipeSteps %}
<li class=\"recipe-howto-item\">
<span>{{ '%02d'|format(loop.index) }}</span>
<div class=\"recipe-howto-list__content\">
{{ info.content|raw }}
</div>
</li>
{% endfor %}
</ol>
</div>
</div>
{% endif %}
{% if Recipe.RecipeNutritions|length > 0 %}
<div class=\"recipe-component\">
<h3 class=\"recipe-box-title\">1食あたりの栄養成分</h3>
<ul class=\"recipe-component-list\">
{% for info in Recipe.RecipeNutritions %}
<li class=\"recipe-component-item\">
<p class=\"recipe-component-title\">{{ info.title }}</p>
<p class=\"recipe-component-number\"><span>{{ '%.1f'|format(info.amount) }}</span>{{ info.unit }}</p>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if Recipe.RecipeCreator is defined and
Recipe.RecipeCreator is not null and
Recipe.CreatorHeading is defined and
Recipe.CreatorHeading is not null and
Recipe.CreatorComment is defined and
Recipe.CreatorComment is not null
%}
<div class=\"recipe-comment\">
<div class=\"recipe-comment-sticky\"><img src=\"{{ asset('assets/img/recipe/img-sticky.png', 'user_data') }}\" alt=\"\"></div>
<div class=\"recipe-comment-head\">
<figure class=\"recipe-comment-picture\">
<img src=\"{{ asset(Recipe.RecipeCreator.filename|no_image_product, 'save_image') }}\" alt=\"{{ Recipe.RecipeCreator.name }}\">
<figcaption>{{ Recipe.RecipeCreator.title }}<span class=\"name\">{{ Recipe.RecipeCreator.name }}</span></figcaption>
</figure>
</div>
<div class=\"recipe-comment-body\">
<p class=\"recipe-comment-title\">{{ Recipe.CreatorHeading }}</p>
<p class=\"recipe-comment-text\">{{ Recipe.CreatorComment|raw|nl2br }}</p>
</div>
</div>
{% endif %}
</article>
</div>
</section>
{% if Recipe.getEnableRelatedProducts|length > 0 %}
<section class=\"p-section bg-gray recipe-product\">
<div class=\"inner\">
<h2 class=\"p-title icon-top\"><span>このレシピに<br class=\"sp\">使われている商品</span></h2>
<div class=\"recipe-product-wrap\">
<div class=\"swiper recipe-product-swiper\">
<div class=\"swiper-wrapper\">
{% for RelatedProduct in Recipe.RelatedProducts %}
<div class=\"swiper-slide recipe-product-slide\">
<a href=\"{{ url('product_detail', { 'id': RelatedProduct.ChildProduct.id })}}\">
<div class=\"recipe-product-item-head\">
<img src=\"{{ asset(RelatedProduct.ChildProduct.main_list_image|no_image_product, 'save_image') }}\" alt=\"\">
</div>
<div class=\"recipe-product-item-body\">
<h3 class=\"recipe-product-item-name\">{{ RelatedProduct.ChildProduct.name }}</h3>
<p class=\"recipe-product-item-desc\">{{ RelatedProduct.ChildProduct.description_detail }}</p>
<p class=\"recipe-product-item-price\">{{ RelatedProduct.ChildProduct.getPrice02Min|price }}<span>円(税抜)</span></p>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
<div class=\"swiper-button-prev\"></div>
<div class=\"swiper-button-next\"></div>
</div>
</div>
</section>
{% endif %}
{% include \"@Recipe/default/recipe_search.twig\" %}
{% endblock %}
", "Recipe/Resource/template/default/detail.twig", "/home/hirota-s.com/public_html/app/template/default/Recipe/Resource/template/default/detail.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 46, "for" => 51, "include" => 203);
static $filters = array("escape" => 4, "length" => 46, "no_image_product" => 48, "last" => 53, "split" => 53, "format" => 125, "raw" => 127, "nl2br" => 165, "price" => 189);
static $functions = array("asset" => 4, "url" => 16);
try {
$this->sandbox->checkSecurity(
['if', 'for', 'include'],
['escape', 'length', 'no_image_product', 'last', 'split', 'format', 'raw', 'nl2br', 'price'],
['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;
}
}
}