var/cache/dev/twig/cb/cbffc793609243539a1b5a2fd93d7d68.php line 58

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/Form/form_admin_fields.html.twig */
  14. class __TwigTemplate_f40604ed286932de764f3e6a8ac17b9f 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->blocks = [
  23.             'form_row' => [$this'block_form_row'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "@!SonataAdmin/Form/form_admin_fields.html.twig";
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SonataAdmin/Form/form_admin_fields.html.twig"));
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SonataAdmin/Form/form_admin_fields.html.twig"));
  38.         $this->parent $this->loadTemplate("@!SonataAdmin/Form/form_admin_fields.html.twig""@SonataAdmin/Form/form_admin_fields.html.twig"1);
  39.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  40.         
  41.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  42.         
  43.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  44.     }
  45.     // line 3
  46.     public function block_form_row($context, array $blocks = [])
  47.     {
  48.         $macros $this->macros;
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""form_row"));
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""form_row"));
  53.         // line 4
  54.         echo "    ";
  55.         $context["show_label"] = (($context["show_label"]) ?? (true));
  56.         // line 5
  57.         echo "    ";
  58.         $context["row_id"] = ("sonata-ba-field-container-" . (isset($context["id"]) || array_key_exists("id"$context) ? $context["id"] : (function () { throw new RuntimeError('Variable "id" does not exist.'5$this->source); })()));
  59.         // line 6
  60.         echo "    ";
  61.         $context["row_class"] = twig_trim_filter(((((twig_get_attribute($this->env$this->source, ($context["row_attr"] ?? null), "class", [], "any"truetruefalse6)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["row_attr"] ?? null), "class", [], "any"falsefalsefalse6), "")) : ("")) . " form-group") . (((twig_length_filter($this->env, (isset($context["errors"]) || array_key_exists("errors"$context) ? $context["errors"] : (function () { throw new RuntimeError('Variable "errors" does not exist.'6$this->source); })())) > 0)) ? (" has-error") : (""))));
  62.         // line 7
  63.         echo "    <div";
  64.         $__internal_compile_0 $context;
  65.         $__internal_compile_1 = ["attr" => twig_array_merge((isset($context["row_attr"]) || array_key_exists("row_attr"$context) ? $context["row_attr"] : (function () { throw new RuntimeError('Variable "row_attr" does not exist.'7$this->source); })()), ["id" => (isset($context["row_id"]) || array_key_exists("row_id"$context) ? $context["row_id"] : (function () { throw new RuntimeError('Variable "row_id" does not exist.'7$this->source); })()), "class" => (isset($context["row_class"]) || array_key_exists("row_class"$context) ? $context["row_class"] : (function () { throw new RuntimeError('Variable "row_class" does not exist.'7$this->source); })())])];
  66.         if (!is_iterable($__internal_compile_1)) {
  67.             throw new RuntimeError('Variables passed to the "with" tag must be a hash.'7$this->getSourceContext());
  68.         }
  69.         $__internal_compile_1 twig_to_array($__internal_compile_1);
  70.         $context $this->env->mergeGlobals(array_merge($context$__internal_compile_1));
  71.         $this->displayBlock("attributes"$context$blocks);
  72.         $context $__internal_compile_0;
  73.         echo " style=\"grid-area: ";
  74.         echo twig_escape_filter($this->envtwig_lower_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_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.'7$this->source); })()), "vars", [], "any"falsefalsefalse7), "name", [], "any"falsefalsefalse7)), "html"nulltrue);
  75.         echo "\">
  76.         ";
  77.         // line 8
  78.         $context["div_class"] = "sonata-ba-field";
  79.         // line 9
  80.         echo "
  81.         ";
  82.         // line 10
  83.         if (((isset($context["label"]) || array_key_exists("label"$context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.'10$this->source); })()) === false)) {
  84.             // line 11
  85.             echo "            ";
  86.             $context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class"$context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.'11$this->source); })()) . " sonata-collection-row-without-label");
  87.             // line 12
  88.             echo "        ";
  89.         }
  90.         // line 13
  91.         echo "
  92.         ";
  93.         // line 14
  94.         if ((array_key_exists("sonata_admin"$context) && (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["sonata_admin"]) || array_key_exists("sonata_admin"$context) ? $context["sonata_admin"] : (function () { throw new RuntimeError('Variable "sonata_admin" does not exist.'14$this->source); })()), "options", [], "any"falsefalsefalse14), "form_type", [], "array"falsefalsefalse14) == "horizontal"))) {
  95.             // line 15
  96.             echo "            ";
  97.             // line 16
  98.             echo "            ";
  99.             if ((((isset($context["label"]) || array_key_exists("label"$context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.'16$this->source); })()) === false) || twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["form"] ?? null), "vars", [], "any"falsetruefalse16), "checked", [], "any"truetruefalse16))) {
  100.                 // line 17
  101.                 echo "                ";
  102.                 if (twig_in_filter("collection"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_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.'17$this->source); })()), "parent", [], "any"falsefalsefalse17), "vars", [], "any"falsefalsefalse17), "block_prefixes", [], "any"falsefalsefalse17))) {
  103.                     // line 18
  104.                     echo "                    ";
  105.                     $context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class"$context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.'18$this->source); })()) . " col-sm-12");
  106.                     // line 19
  107.                     echo "                ";
  108.                 } else {
  109.                     // line 20
  110.                     echo "                    ";
  111.                     $context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class"$context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.'20$this->source); })()) . " col-sm-9 col-sm-offset-3");
  112.                     // line 21
  113.                     echo "                ";
  114.                 }
  115.                 // line 22
  116.                 echo "            ";
  117.             } else {
  118.                 // line 23
  119.                 echo "                ";
  120.                 $context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class"$context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.'23$this->source); })()) . " col-sm-9");
  121.                 // line 24
  122.                 echo "            ";
  123.             }
  124.             // line 25
  125.             echo "        ";
  126.         }
  127.         // line 26
  128.         echo "
  129.         ";
  130.         // line 27
  131.         if ((isset($context["show_label"]) || array_key_exists("show_label"$context) ? $context["show_label"] : (function () { throw new RuntimeError('Variable "show_label" does not exist.'27$this->source); })())) {
  132.             // line 28
  133.             echo "            ";
  134.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'28$this->source); })()), 'label', (twig_test_empty($_label_ = ((array_key_exists("label"$context)) ? (_twig_default_filter((isset($context["label"]) || array_key_exists("label"$context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.'28$this->source); })()), null)) : (null))) ? [] : ["label" => $_label_]));
  135.             echo "
  136.         ";
  137.         }
  138.         // line 30
  139.         echo "
  140.         ";
  141.         // line 31
  142.         if ((array_key_exists("sonata_admin"$context) && (isset($context["sonata_admin_enabled"]) || array_key_exists("sonata_admin_enabled"$context) ? $context["sonata_admin_enabled"] : (function () { throw new RuntimeError('Variable "sonata_admin_enabled" does not exist.'31$this->source); })()))) {
  143.             // line 32
  144.             echo "            ";
  145.             $context["div_class"] = (((((isset($context["div_class"]) || array_key_exists("div_class"$context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.'32$this->source); })()) . " sonata-ba-field-") . twig_get_attribute($this->env$this->source, (isset($context["sonata_admin"]) || array_key_exists("sonata_admin"$context) ? $context["sonata_admin"] : (function () { throw new RuntimeError('Variable "sonata_admin" does not exist.'32$this->source); })()), "edit", [], "any"falsefalsefalse32)) . "-") . twig_get_attribute($this->env$this->source, (isset($context["sonata_admin"]) || array_key_exists("sonata_admin"$context) ? $context["sonata_admin"] : (function () { throw new RuntimeError('Variable "sonata_admin" does not exist.'32$this->source); })()), "inline", [], "any"falsefalsefalse32));
  146.             // line 33
  147.             echo "        ";
  148.         }
  149.         // line 34
  150.         echo "
  151.         ";
  152.         // line 35
  153.         if ((twig_length_filter($this->env, (isset($context["errors"]) || array_key_exists("errors"$context) ? $context["errors"] : (function () { throw new RuntimeError('Variable "errors" does not exist.'35$this->source); })())) > 0)) {
  154.             // line 36
  155.             echo "            ";
  156.             $context["div_class"] = ((isset($context["div_class"]) || array_key_exists("div_class"$context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.'36$this->source); })()) . " sonata-ba-field-error");
  157.             // line 37
  158.             echo "        ";
  159.         }
  160.         // line 38
  161.         echo "
  162.         <div class=\"";
  163.         // line 39
  164.         echo twig_escape_filter($this->env, ((twig_get_attribute($this->env$this->source, ($context["row_attr"] ?? null), "more_info_class", [], "any"truetruefalse39)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["row_attr"] ?? null), "more_info_class", [], "any"falsefalsefalse39), "")) : ("")), "html"nulltrue);
  165.         echo " ";
  166.         echo twig_escape_filter($this->env, (isset($context["div_class"]) || array_key_exists("div_class"$context) ? $context["div_class"] : (function () { throw new RuntimeError('Variable "div_class" does not exist.'39$this->source); })()), "html"nulltrue);
  167.         echo "\">
  168.             ";
  169.         // line 40
  170.         if (twig_get_attribute($this->env$this->source, ($context["row_attr"] ?? null), "more_info_class", [], "any"truetruefalse40)) {
  171.             echo "<span class=\"action-close-more_info fa fa-close\" style=\"float:right;\"></span>";
  172.         }
  173.         // line 41
  174.         echo "            ";
  175.         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'41$this->source); })()), 'widget', ["horizontal" => false"horizontal_input_wrapper_class" => ""]);
  176.         echo " ";
  177.         // line 42
  178.         echo "
  179.             ";
  180.         // line 43
  181.         if ((twig_length_filter($this->env, (isset($context["errors"]) || array_key_exists("errors"$context) ? $context["errors"] : (function () { throw new RuntimeError('Variable "errors" does not exist.'43$this->source); })())) > 0)) {
  182.             // line 44
  183.             echo "                <div class=\"help-block sonata-ba-field-error-messages\">
  184.                     ";
  185.             // line 45
  186.             echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'45$this->source); })()), 'errors');
  187.             echo "
  188.                 </div>
  189.             ";
  190.         }
  191.         // line 48
  192.         echo "
  193.             ";
  194.         // line 49
  195.         echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock((isset($context["form"]) || array_key_exists("form"$context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.'49$this->source); })()), 'help');
  196.         echo "
  197.         </div>
  198.     </div>
  199. ";
  200.         
  201.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  202.         
  203.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  204.     }
  205.     /**
  206.      * @codeCoverageIgnore
  207.      */
  208.     public function getTemplateName()
  209.     {
  210.         return "@SonataAdmin/Form/form_admin_fields.html.twig";
  211.     }
  212.     /**
  213.      * @codeCoverageIgnore
  214.      */
  215.     public function isTraitable()
  216.     {
  217.         return false;
  218.     }
  219.     /**
  220.      * @codeCoverageIgnore
  221.      */
  222.     public function getDebugInfo()
  223.     {
  224.         return array (  209 => 49,  206 => 48,  200 => 45,  197 => 44,  195 => 43,  192 => 42,  188 => 41,  184 => 40,  178 => 39,  175 => 38,  172 => 37,  169 => 36,  167 => 35,  164 => 34,  161 => 33,  158 => 32,  156 => 31,  153 => 30,  147 => 28,  145 => 27,  142 => 26,  139 => 25,  136 => 24,  133 => 23,  130 => 22,  127 => 21,  124 => 20,  121 => 19,  118 => 18,  115 => 17,  112 => 16,  110 => 15,  108 => 14,  105 => 13,  102 => 12,  99 => 11,  97 => 10,  94 => 9,  92 => 8,  77 => 7,  74 => 6,  71 => 5,  68 => 4,  58 => 3,  35 => 1,);
  225.     }
  226.     public function getSourceContext()
  227.     {
  228.         return new Source("{% extends '@!SonataAdmin/Form/form_admin_fields.html.twig' %}
  229. {% block form_row %}
  230.     {% set show_label = show_label ?? true %}
  231.     {% set row_id = 'sonata-ba-field-container-'~id %}
  232.     {% set row_class = (row_attr.class|default('') ~ ' form-group' ~ (errors|length > 0 ? ' has-error'))|trim %}
  233.     <div{% with {attr: row_attr|merge({id: row_id, class: row_class})} %}{{ block('attributes') }}{% endwith %} style=\"grid-area: {{ form.vars.name|lower }}\">
  234.         {% set div_class = 'sonata-ba-field' %}
  235.         {% if label is same as(false) %}
  236.             {% set div_class = div_class ~ ' sonata-collection-row-without-label' %}
  237.         {% endif %}
  238.         {% if sonata_admin is defined and sonata_admin.options['form_type'] == 'horizontal' %}
  239.             {# Add an offset if no label or is a checkbox/radio #}
  240.             {% if label is same as(false) or form.vars.checked is defined %}
  241.                 {% if 'collection' in form.parent.vars.block_prefixes %}
  242.                     {% set div_class = div_class ~ ' col-sm-12' %}
  243.                 {% else %}
  244.                     {% set div_class = div_class ~ ' col-sm-9 col-sm-offset-3' %}
  245.                 {% endif %}
  246.             {% else %}
  247.                 {% set div_class = div_class ~ ' col-sm-9' %}
  248.             {% endif %}
  249.         {% endif %}
  250.         {% if show_label %}
  251.             {{ form_label(form, label|default(null)) }}
  252.         {% endif %}
  253.         {% if sonata_admin is defined and sonata_admin_enabled %}
  254.             {% set div_class = div_class ~ ' sonata-ba-field-' ~ sonata_admin.edit ~ '-' ~ sonata_admin.inline %}
  255.         {% endif %}
  256.         {% if errors|length > 0 %}
  257.             {% set div_class = div_class ~ ' sonata-ba-field-error' %}
  258.         {% endif %}
  259.         <div class=\"{{ row_attr.more_info_class | default('') }} {{ div_class }}\">
  260.             {% if(row_attr.more_info_class is defined) %}<span class=\"action-close-more_info fa fa-close\" style=\"float:right;\"></span>{% endif %}
  261.             {{ form_widget(form, {'horizontal': false, 'horizontal_input_wrapper_class': ''}) }} {# {'horizontal': false, 'horizontal_input_wrapper_class': ''} needed to avoid MopaBootstrapBundle messing with the DOM #}
  262.             {% if errors|length > 0 %}
  263.                 <div class=\"help-block sonata-ba-field-error-messages\">
  264.                     {{ form_errors(form) }}
  265.                 </div>
  266.             {% endif %}
  267.             {{ form_help(form) }}
  268.         </div>
  269.     </div>
  270. {% endblock form_row %}""@SonataAdmin/Form/form_admin_fields.html.twig""/var/www/vhosts/perseo.comerziawatches.com/httpdocs/perseo/httpdocs/templates/bundles/SonataAdminBundle/Form/form_admin_fields.html.twig");
  271.     }
  272. }