var/cache/dev/twig/40/40d095a3b3e427ce1894e8ef64c712be.php line 51

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @SonataAdmin/CRUD/base_edit_form_macro.html.twig */
  14. class __TwigTemplate_e4413b0d28c1e741c9545612142a0e4b extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SonataAdmin/CRUD/base_edit_form_macro.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SonataAdmin/CRUD/base_edit_form_macro.html.twig"));
  33.         
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  35.         
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  37.     }
  38.     // line 1
  39.     public function macro_render_groups($__admin__ null$__form__ null$__groups__ null$__has_tab__ null, ...$__varargs__)
  40.     {
  41.         $macros $this->macros;
  42.         $context $this->env->mergeGlobals([
  43.             "admin" => $__admin__,
  44.             "form" => $__form__,
  45.             "groups" => $__groups__,
  46.             "has_tab" => $__has_tab__,
  47.             "varargs" => $__varargs__,
  48.         ]);
  49.         $blocks = [];
  50.         ob_start();
  51.         try {
  52.             $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  53.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""render_groups"));
  54.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  55.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "macro""render_groups"));
  56.             // line 2
  57.             echo "    <div class=\"row\">
  58.         ";
  59.             // line 4
  60.             $context['_parent'] = $context;
  61.             $context['_seq'] = twig_ensure_traversable(twig_array_filter($this->env, (isset($context["groups"]) || array_key_exists("groups"$context) ? $context["groups"] : (function () { throw new RuntimeError('Variable "groups" does not exist.'4$this->source); })()), function ($__code__) use ($context$macros) { $context["code"] = $__code__; return twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["admin"] ?? null), "formgroups", [], "any"falsetruefalse4), $context["code"], [], "array"truetruefalse4); }));
  62.             foreach ($context['_seq'] as $context["_key"] => $context["code"]) {
  63.                 // line 5
  64.                 echo "            ";
  65.                 $context["form_group"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["admin"]) || array_key_exists("admin"$context) ? $context["admin"] : (function () { throw new RuntimeError('Variable "admin" does not exist.'5$this->source); })()), "formgroups", [], "any"falsefalsefalse5), $context["code"], [], "array"falsefalsefalse5);
  66.                 // line 6
  67.                 echo "
  68.             <div class=\"with ";
  69.                 // line 7
  70.                 echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "class", [], "any"truetruefalse7)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "class", [], "any"falsefalsefalse7), "col-md-12")) : ("col-md-12")), "html"nulltrue);
  71.                 echo " ";
  72.                 echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'7$this->source); })()), "name", [], "any"falsefalsefalse7), ["." => "_"]), "html"nulltrue);
  73.                 echo "\" style=\"grid-area: ";
  74.                 echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'7$this->source); })()), "name", [], "any"falsefalsefalse7), ["." => "_"]), "html"nulltrue);
  75.                 echo "\">
  76.                 <div class=\"";
  77.                 // line 8
  78.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'8$this->source); })()), "box_class", [], "any"falsefalsefalse8), "html"nulltrue);
  79.                 echo "\">
  80.                     <div class=\"box-header\">
  81.                         <h4 class=\"box-title\">
  82.                             ";
  83.                 // line 11
  84.                 if ((twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "translation_domain", [], "any"truetruefalse11) && (twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'11$this->source); })()), "translation_domain", [], "any"falsefalsefalse11) === false))) {
  85.                     // line 12
  86.                     echo "                                ";
  87.                     echo twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'12$this->source); })()), "label", [], "any"falsefalsefalse12);
  88.                     echo "
  89.                             ";
  90.                 } else {
  91.                     // line 14
  92.                     echo "                                ";
  93.                     echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'14$this->source); })()), "label", [], "any"falsefalsefalse14), [], (((twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "translation_domain", [], "any"truetruefalse14) &&  !(null === twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "translation_domain", [], "any"falsefalsefalse14)))) ? (twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "translation_domain", [], "any"falsefalsefalse14)) : (twig_get_attribute($this->env$this->source, (isset($context["admin"]) || array_key_exists("admin"$context) ? $context["admin"] : (function () { throw new RuntimeError('Variable "admin" does not exist.'14$this->source); })()), "translationDomain", [], "any"falsefalsefalse14))));
  94.                     echo "
  95.                             ";
  96.                 }
  97.                 // line 16
  98.                 echo "                        </h4>
  99.                         <i class=\"action-with-collapse-show icon-with-collapse pull-right\" style=\"display: none; content: url('/assets/img/icon-collapse.png'); position: relative; top: 5px;\"></i>
  100.                     </div>
  101.                     <div class=\"box-body\">
  102.                         <div class=\"sonata-ba-collapsed-fields\">
  103.                             ";
  104.                 // line 21
  105.                 if (twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'21$this->source); })()), "description", [], "any"falsefalsefalse21)) {
  106.                     // line 22
  107.                     echo "                                ";
  108.                     if ((twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "translation_domain", [], "any"truetruefalse22) && (twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'22$this->source); })()), "translation_domain", [], "any"falsefalsefalse22) === false))) {
  109.                         // line 23
  110.                         echo "                                    <p>";
  111.                         echo twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'23$this->source); })()), "description", [], "any"falsefalsefalse23);
  112.                         echo "</p>
  113.                                 ";
  114.                     } else {
  115.                         // line 25
  116.                         echo "                                    <p>";
  117.                         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'25$this->source); })()), "description", [], "any"falsefalsefalse25), [], (((twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "translation_domain", [], "any"truetruefalse25) &&  !(null === twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "translation_domain", [], "any"falsefalsefalse25)))) ? (twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "translation_domain", [], "any"falsefalsefalse25)) : (twig_get_attribute($this->env$this->source, (isset($context["admin"]) || array_key_exists("admin"$context) ? $context["admin"] : (function () { throw new RuntimeError('Variable "admin" does not exist.'25$this->source); })()), "translationDomain", [], "any"falsefalsefalse25))));
  118.                         echo "</p>
  119.                                 ";
  120.                     }
  121.                     // line 27
  122.                     echo "                            ";
  123.                 }
  124.                 // line 28
  125.                 echo "
  126.                             ";
  127.                 // line 29
  128.                 $context['_parent'] = $context;
  129.                 $context['_seq'] = twig_ensure_traversable(twig_array_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'29$this->source); })()), "fields", [], "any"falsefalsefalse29), function ($__form_field_name__) use ($context$macros) { $context["form_field_name"] = $__form_field_name__; return twig_get_attribute($this->env$this->source, ($context["form"] ?? null), $context["form_field_name"], [], "array"truetruefalse29); }));
  130.                 $context['_iterated'] = false;
  131.                 foreach ($context['_seq'] as $context["_key"] => $context["form_field_name"]) {
  132.                     // line 30
  133.                     echo "                                ";
  134.                     echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env$this->source, (isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'30$this->source); })()), $context["form_field_name"], [], "array"falsefalsefalse30), 'row');
  135.                     echo "
  136.                             ";
  137.                     $context['_iterated'] = true;
  138.                 }
  139.                 if (!$context['_iterated']) {
  140.                     // line 32
  141.                     echo "                                ";
  142.                     if ((twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'32$this->source); })()), "empty_message", [], "any"falsefalsefalse32) != false)) {
  143.                         // line 33
  144.                         echo "                                    ";
  145.                         if ((twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "empty_message_translation_domain", [], "any"truetruefalse33) && (twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'33$this->source); })()), "empty_message_translation_domain", [], "any"falsefalsefalse33) === false))) {
  146.                             // line 34
  147.                             echo "                                        <em>";
  148.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'34$this->source); })()), "empty_message", [], "any"falsefalsefalse34), "html"nulltrue);
  149.                             echo "</em>
  150.                                     ";
  151.                         } else {
  152.                             // line 36
  153.                             echo "                                        <em>";
  154.                             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env$this->source, (isset($context["form_group"]) || array_key_exists("form_group"$context) ? $context["form_group"] : (function () { throw new RuntimeError('Variable "form_group" does not exist.'36$this->source); })()), "empty_message", [], "any"falsefalsefalse36), [], (((twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "empty_message_translation_domain", [], "any"truetruefalse36) &&  !(null === twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "empty_message_translation_domain", [], "any"falsefalsefalse36)))) ? (twig_get_attribute($this->env$this->source, ($context["form_group"] ?? null), "empty_message_translation_domain", [], "any"falsefalsefalse36)) : (twig_get_attribute($this->env$this->source, (isset($context["admin"]) || array_key_exists("admin"$context) ? $context["admin"] : (function () { throw new RuntimeError('Variable "admin" does not exist.'36$this->source); })()), "translationDomain", [], "any"falsefalsefalse36)))), "html"nulltrue);
  155.                             echo "</em>
  156.                                     ";
  157.                         }
  158.                         // line 38
  159.                         echo "                                ";
  160.                     }
  161.                     // line 39
  162.                     echo "                            ";
  163.                 }
  164.                 $_parent $context['_parent'];
  165.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['form_field_name'], $context['_parent'], $context['loop']);
  166.                 $context array_intersect_key($context$_parent) + $_parent;
  167.                 // line 40
  168.                 echo "                        </div>
  169.                     </div>
  170.                 </div>
  171.             </div>
  172.         ";
  173.             }
  174.             $_parent $context['_parent'];
  175.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['code'], $context['_parent'], $context['loop']);
  176.             $context array_intersect_key($context$_parent) + $_parent;
  177.             // line 45
  178.             echo "    </div>
  179. ";
  180.             
  181.             $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  182.             
  183.             $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  184.             return ('' === $tmp ob_get_contents()) ? '' : new Markup($tmp$this->env->getCharset());
  185.         } finally {
  186.             ob_end_clean();
  187.         }
  188.     }
  189.     /**
  190.      * @codeCoverageIgnore
  191.      */
  192.     public function getTemplateName()
  193.     {
  194.         return "@SonataAdmin/CRUD/base_edit_form_macro.html.twig";
  195.     }
  196.     /**
  197.      * @codeCoverageIgnore
  198.      */
  199.     public function isTraitable()
  200.     {
  201.         return false;
  202.     }
  203.     /**
  204.      * @codeCoverageIgnore
  205.      */
  206.     public function getDebugInfo()
  207.     {
  208.         return array (  195 => 45,  185 => 40,  179 => 39,  176 => 38,  170 => 36,  164 => 34,  161 => 33,  158 => 32,  150 => 30,  145 => 29,  142 => 28,  139 => 27,  133 => 25,  127 => 23,  124 => 22,  122 => 21,  115 => 16,  109 => 14,  103 => 12,  101 => 11,  95 => 8,  87 => 7,  84 => 6,  81 => 5,  77 => 4,  73 => 2,  51 => 1,);
  209.     }
  210.     public function getSourceContext()
  211.     {
  212.         return new Source("{% macro render_groups(admin, form, groups, has_tab) %}
  213.     <div class=\"row\">
  214.         {% for code in groups|filter(code => admin.formgroups[code] is defined) %}
  215.             {% set form_group = admin.formgroups[code] %}
  216.             <div class=\"with {{ form_group.class|default('col-md-12') }} {{ form_group.name|replace({'.': '_'}) }}\" style=\"grid-area: {{ form_group.name|replace({'.': '_'}) }}\">
  217.                 <div class=\"{{ form_group.box_class }}\">
  218.                     <div class=\"box-header\">
  219.                         <h4 class=\"box-title\">
  220.                             {% if form_group.translation_domain is defined and form_group.translation_domain is same as(false) %}
  221.                                 {{ form_group.label | raw }}
  222.                             {% else %}
  223.                                 {{ form_group.label | trans({}, form_group.translation_domain ?? admin.translationDomain) | raw }}
  224.                             {% endif %}
  225.                         </h4>
  226.                         <i class=\"action-with-collapse-show icon-with-collapse pull-right\" style=\"display: none; content: url('/assets/img/icon-collapse.png'); position: relative; top: 5px;\"></i>
  227.                     </div>
  228.                     <div class=\"box-body\">
  229.                         <div class=\"sonata-ba-collapsed-fields\">
  230.                             {% if form_group.description %}
  231.                                 {% if form_group.translation_domain is defined and form_group.translation_domain is same as(false) %}
  232.                                     <p>{{ form_group.description|raw }}</p>
  233.                                 {% else %}
  234.                                     <p>{{ form_group.description|trans({}, form_group.translation_domain ?? admin.translationDomain)|raw }}</p>
  235.                                 {% endif %}
  236.                             {% endif %}
  237.                             {% for form_field_name in form_group.fields|filter(form_field_name => form[form_field_name] is defined) %}
  238.                                 {{ form_row(form[form_field_name]) }}
  239.                             {% else %}
  240.                                 {% if form_group.empty_message != false %}
  241.                                     {% if form_group.empty_message_translation_domain is defined and form_group.empty_message_translation_domain is same as(false) %}
  242.                                         <em>{{ form_group.empty_message }}</em>
  243.                                     {% else %}
  244.                                         <em>{{ form_group.empty_message|trans({}, form_group.empty_message_translation_domain ?? admin.translationDomain) }}</em>
  245.                                     {% endif %}
  246.                                 {% endif %}
  247.                             {% endfor %}
  248.                         </div>
  249.                     </div>
  250.                 </div>
  251.             </div>
  252.         {% endfor %}
  253.     </div>
  254. {% endmacro %}""@SonataAdmin/CRUD/base_edit_form_macro.html.twig""/var/www/vhosts/perseo.comerziawatches.com/httpdocs/perseo/httpdocs/templates/bundles/SonataAdminBundle/CRUD/base_edit_form_macro.html.twig");
  255.     }
  256. }