199 lines
7.9 KiB
PHP
199 lines
7.9 KiB
PHP
<?php
|
|
|
|
use Twig\Environment;
|
|
use Twig\Error\LoaderError;
|
|
use Twig\Error\RuntimeError;
|
|
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;
|
|
|
|
/* @PrestaShop/Admin/Product/Themes/categories_theme.html.twig */
|
|
class __TwigTemplate_0e421599f7e3afbd8b016086297ead419265519c00cd31a9461a5a88cf0527dd extends \Twig\Template
|
|
{
|
|
public function __construct(Environment $env)
|
|
{
|
|
parent::__construct($env);
|
|
|
|
$this->parent = false;
|
|
|
|
$this->blocks = [
|
|
'choice_tree_widget' => [$this, 'block_choice_tree_widget'],
|
|
'choice_tree_item_widget' => [$this, 'block_choice_tree_item_widget'],
|
|
];
|
|
}
|
|
|
|
protected function doDisplay(array $context, array $blocks = [])
|
|
{
|
|
// line 25
|
|
$this->displayBlock('choice_tree_widget', $context, $blocks);
|
|
// line 36
|
|
echo "
|
|
";
|
|
// line 37
|
|
$this->displayBlock('choice_tree_item_widget', $context, $blocks);
|
|
}
|
|
|
|
// line 25
|
|
public function block_choice_tree_widget($context, array $blocks = [])
|
|
{
|
|
// line 26
|
|
echo "<div ";
|
|
$this->displayBlock("widget_container_attributes", $context, $blocks);
|
|
echo ">
|
|
<ul class=\"category-tree\">";
|
|
// line 29
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = twig_ensure_traversable(($context["choices"] ?? null));
|
|
$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["child"]) {
|
|
// line 30
|
|
echo " ";
|
|
$this->displayBlock("choice_tree_item_widget", $context, $blocks);
|
|
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['child'], $context['_parent'], $context['loop']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 32
|
|
echo "</ul>
|
|
</div>";
|
|
}
|
|
|
|
// line 37
|
|
public function block_choice_tree_item_widget($context, array $blocks = [])
|
|
{
|
|
// line 38
|
|
echo "<li>
|
|
";
|
|
// line 39
|
|
$context["checked"] = ((($this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", [], "any", false, true), "submitted_values", [], "any", true, true) && $this->getAttribute(($context["submitted_values"] ?? null), $this->getAttribute(($context["child"] ?? null), "id_category", []), [], "array", true, true))) ? ("checked=\"checked\"") : (""));
|
|
// line 40
|
|
echo "
|
|
<div class=\"radio\">
|
|
<label class=\"category-label\" for=\"form[";
|
|
// line 42
|
|
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
|
|
echo "][tree]\">";
|
|
echo twig_escape_filter($this->env, $this->getAttribute(($context["child"] ?? null), "name", []), "html", null, true);
|
|
echo "
|
|
<input
|
|
type=\"radio\"
|
|
name=\"form[";
|
|
// line 45
|
|
echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "id", []), "html", null, true);
|
|
echo "][tree]\"
|
|
value=\"";
|
|
// line 46
|
|
echo twig_escape_filter($this->env, $this->getAttribute(($context["child"] ?? null), "id_category", []), "html", null, true);
|
|
echo "\" ";
|
|
echo twig_escape_filter($this->env, ($context["checked"] ?? null), "html", null, true);
|
|
echo "
|
|
class=\"category float-right\"
|
|
>
|
|
</label>
|
|
</div>
|
|
|
|
";
|
|
// line 52
|
|
if ($this->getAttribute(($context["child"] ?? null), "children", [], "any", true, true)) {
|
|
// line 53
|
|
echo " <ul ";
|
|
if (($this->getAttribute($this->getAttribute(($context["form"] ?? null), "vars", []), "expanded", []) == false)) {
|
|
echo "style=\"display: none\"";
|
|
}
|
|
echo ">
|
|
";
|
|
// line 54
|
|
$context['_parent'] = $context;
|
|
$context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["child"] ?? null), "children", []));
|
|
$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["item"]) {
|
|
// line 55
|
|
echo " ";
|
|
$context["child"] = $context["item"];
|
|
// line 56
|
|
echo " ";
|
|
$this->displayBlock("choice_tree_item_widget", $context, $blocks);
|
|
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['item'], $context['_parent'], $context['loop']);
|
|
$context = array_intersect_key($context, $_parent) + $_parent;
|
|
// line 58
|
|
echo "</ul>
|
|
";
|
|
}
|
|
// line 60
|
|
echo " </li>";
|
|
}
|
|
|
|
public function getTemplateName()
|
|
{
|
|
return "@PrestaShop/Admin/Product/Themes/categories_theme.html.twig";
|
|
}
|
|
|
|
public function getDebugInfo()
|
|
{
|
|
return array ( 173 => 60, 169 => 58, 152 => 56, 149 => 55, 132 => 54, 125 => 53, 123 => 52, 112 => 46, 108 => 45, 100 => 42, 96 => 40, 94 => 39, 91 => 38, 88 => 37, 83 => 32, 66 => 30, 49 => 29, 44 => 26, 41 => 25, 37 => 37, 34 => 36, 32 => 25,);
|
|
}
|
|
|
|
/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
|
|
public function getSource()
|
|
{
|
|
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
|
|
|
|
return $this->getSourceContext()->getCode();
|
|
}
|
|
|
|
public function getSourceContext()
|
|
{
|
|
return new Source("", "@PrestaShop/Admin/Product/Themes/categories_theme.html.twig", "/Volumes/Dev/Sources/Clients/taome/Nouveau_site/www/src/PrestaShopBundle/Resources/views/Admin/Product/Themes/categories_theme.html.twig");
|
|
}
|
|
}
|