Skip to content

Commit 7c81c22

Browse files
committed
doc for more form features and some fixings
1 parent b1205ad commit 7c81c22

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

extension/method_parameter.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ Hash Tags
4949
* ``goto`` - known string in #<Provider>
5050
* ``complete`` - when support by #<Provider>
5151

52-
supported ``Entity``, ``Service``, ``Service``, ``Template``, ``Route``, ``Class``, ``TranslationKey`` , ``TranslationDomain``
52+
supported ``Entity``, ``Service``, ``FormType``, ``Template``, ``Route``, ``Class``, ``TranslationKey`` , ``TranslationDomain``, ``FormOption``
5353

5454
.. note::
55-
TranslationKey are filtered on a TranslationDomain parameter, when provided else fallback to `messages`
55+
TranslationKey are filtered on a TranslationDomain parameter, when provided else fallback to ``messages``
5656
You should better use defined parameter on signatures which are docblock independent
5757

index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Symfony2 PhpStorm Plugin Documentation
1111

1212

1313
Navigation
14-
==================
14+
======================
1515

1616
.. toctree::
1717
:glob:

languages/php/index.rst

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ Forms
160160
# Symfony\Component\Form\FormBuilderInterface::add
161161
$builder->add('field', '<complete>');
162162
163+
* ``goto`` - resolved class
163164
* ``complete`` - Registered FormTypes aliases
164165

165166
.. code-block:: php
@@ -175,6 +176,9 @@ Forms
175176
* ``goto`` - Translation definition
176177
* ``complete`` - Translation key or domain
177178

179+
.. note::
180+
also ``translation_domain`` inside ``OptionsResolverInterface::setDefaults`` is supported for filter
181+
178182
.. code-block:: php
179183
180184
# Symfony\Component\OptionsResolver\OptionsResolverInterface::setDefaults
@@ -183,7 +187,7 @@ Forms
183187
));
184188
185189
# Symfony\Component\Form\FormBuilderInterface::add
186-
$builder->add('field', 'button' , array(
190+
$builder->add('field', 'form_alias'|FormTypeInterface, array(
187191
'class' => '<entity_class>'
188192
));
189193
@@ -193,11 +197,25 @@ Forms
193197
.. code-block:: php
194198
195199
# Symfony\Component\Form\FormBuilderInterface::add
196-
$builder->add('field', 'button' , array(
200+
$builder->add('field', 'form_alias'|FormTypeInterface, array(
197201
'<option>' => ''
198202
));
199203
200204
* ``goto`` - tagged form extension with ``form.type_extension`` or ``getParent`` tree of known form_type
201205
* ``complete`` - name for option
206+
207+
.. code-block:: php
208+
209+
# Symfony\Component\OptionsResolver\OptionsResolverInterface::setDefaults
210+
$resolver->setDefaults(array(
211+
'<form_options|form_extensions>' => ''
212+
));
213+
214+
# Symfony\Component\Form\FormBuilderInterface::add
215+
$builder->add('field', 'form_alias'|FormTypeInterface, array(
216+
'<form_options|form_type_options|form_extensions>' => ''
217+
));
202218
219+
* ``goto`` - array definition of option
220+
* ``complete`` - all matched form options
203221

languages/twig/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Templates
1616

1717
based on ``BundleInterface``, ``addPath`` of container and custom path of settings
1818

19+
* ``goto`` - open file
20+
* ``complete`` - template names
21+
* ``annotator`` - Notice missing template and create action
22+
1923
.. code-block:: html+jinja
2024

2125
{% string '<template.html.twig>' %}

0 commit comments

Comments
 (0)