Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Symfony 2.2 では、次の方法でテンプレートのフォーム フィールド属性にアクセスできました。
<?php $form['field_name']->get('field_attribute') ?>
Symfony 2.3でこれを行うにはどうすればよいですか? FormView オブジェクトには、この機能はありません。
編集 :
実際、 FormViewにはget代わりに機能がありません:
get
array $vars The variables assigned to this view.
小枝で同様:{{ form.task.vars.full_name }}
{{ form.task.vars.full_name }}
ドキュメントの PHP スニペットが古くなっているようです