php - 什么是表单变量
问题描述
我在树枝上有这个模板:
{% form_theme form _self %}
{% block body %}
<div class="container">
<h1>creer une nouvelle annonce</h1>
{{ form_start(form) }}
{{ form_widget(form) }}
<button type="submit" class="btn btn-primary">créer la nouvelle annonce</button>
{{ form_end(form, {'render_rest': false}) }}
</div>
{% endblock %}
{% block form_row %}
<pre>
{{ dump() }}
</pre>
<div class="form-group">
{{ form_label(form) }}
{{ form_widget(form) }}
</div>
{% endblock %}
这是我的 chrome 中转储函数的输出:
array:32 [▼
"value" => ""
"attr" => array:1 [▶]
"form" => Symfony\Component\Form\FormView {#707 ▶}
"id" => "ad_title"
"name" => "title"
"full_name" => "ad[title]"
"disabled" => false
"label" => null
"label_format" => null
"multipart" => false
"block_prefixes" => array:3 [▶]
"unique_block_prefix" => "_ad_title"
"row_attr" => []
"translation_domain" => null
"label_translation_parameters" => []
"attr_translation_parameters" => []
"cache_key" => "_ad_title_text"
"errors" => Symfony\Component\Form\FormErrorIterator {#708 ▶}
"valid" => true
"data" => null
"required" => true
"size" => null
"label_attr" => []
"help" => null
"help_attr" => []
"help_html" => false
"help_translation_parameters" => []
"compound" => false
"method" => "POST"
"action" => ""
"submitted" => false
"app" => Symfony\Bridge\Twig\AppVariable {#277 ▶}
]
form
上面转储函数输出的第 4 行中的变量是什么
解决方案
推荐阅读
- highcharts - Highcharts yAxis 绘图线未显示在“折线”图表类型上
- python - 在 for 循环中创建更多带有背景的窗口(使用路径)
- python - 如何解决 NetworkX 错误 NoPath:无法从 Y 访问节点 X
- flutter - Flutter 最佳架构模式
- javascript - Firebase 扩展:使用 Stripe 运行订阅付款不返回 sessionId
- aws-lambda - 如何找出为 AWS Lambda 预安装的受信任 CA?
- json - SwifUI:我下载的 JSON 是否保存到 coreData?
- sql - 具有不同数据类型 SQL 的内连接
- domain-driven-design - 当模型与配置表之类的聚合根无关时,我将模型放在哪里
- r - 如何在多小提琴图中为每把小提琴添加中点?