File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change
1
+ attr
2
+ ~~~~
3
+
4
+ **データ型**: array **デフォルト値**: Empty array
5
+
6
+ HTML フィールドの表現に追加属性を加えたい場合、\ ``attr`` オプションを使うことが出来ます。これは HTML 属性をキーとした連想配列です。ウィジェットにカスタムクラスを設定する必要があるときに便利です。::
7
+
8
+ $builder->add('body', 'textarea', array(
9
+ 'attr' => array('class' => 'tinymce'),
10
+ ));
11
+
12
+ .. 2014/03/07 yositani2002 47553456070b494377c96097c01ec3138ec1090b
Original file line number Diff line number Diff line change 1
1
data
2
2
~~~~
3
3
4
- **type **: mixed **default **: Defaults to field of the underlying object (if there is one)
4
+ **データ型 **: mixed **デフォルト **: 対応するオブジェクトのフィールド(一つであれば)
5
5
6
- When you create a form, each field initially displays the value of the
7
- corresponding property of the form's domain object (if an object is bound
8
- to the form). If you want to override the initial value for the form or just
9
- and individual field, you can set it in the data option::
6
+ フォームを作成したとき、各フィールドに表示する初期値は、フォームのドメインオブジェクトの対応するプロパティの値です(オブジェクトがフォームにバインドされている場合)。もしフォーム、または、単に個々のフィールドの初期値を上書きしたい場合は、\ ``data`` オプションで設定することが出来ます。::
10
7
11
8
$builder->add('token', 'hidden', array(
12
9
'data' => 'abcdef',
13
10
));
14
11
12
+ .. note::
13
+ フォームのフィールドのデフォルト値は、直接データ構造(例えば、エンティティまたは配列)から取得されます。
14
+ ``data`` オプションはこのデフォルト値を上書きします。
15
15
16
+ .. 2014/03/07 yositani2002 08d95b27e7d210b16889a22b2d6d8ba11820ae4a
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ choice_list
49
49
50
50
**デフォルト **: :class: `Symfony\\ Component\\ Form\\ Extension\\ Core\\ ChoiceList\\ TimezoneChoiceList `
51
51
52
- ``Timezone `` タイプのデフォルトの ``choice_list `` は :phpmethod:`DateTimeZone::listIdentifiers` で返されるすべてのタイムゾーンとなり、大陸別に分類します。
52
+ ``Timezone `` タイプのデフォルトの ``choice_list `` は :phpmethod: `DateTimeZone::listIdentifiers ` で返されるすべてのタイムゾーンとなり、大陸別に分類します。
53
53
54
54
継承されたオプション
55
55
--------------------
You can’t perform that action at this time.
0 commit comments