diff --git a/book/forms.rst b/book/forms.rst
index e2767f72e56..72a0e61f186 100644
--- a/book/forms.rst
+++ b/book/forms.rst
@@ -1068,7 +1068,7 @@ that will house the logic for building the task form::
public function getName()
{
- return 'task';
+ return 'app_task';
}
}
@@ -1176,7 +1176,7 @@ easy to use in your application.
app.form.type.task:
class: AppBundle\Form\Type\TaskType
tags:
- - { name: form.type, alias: task }
+ - { name: form.type, alias: app_task }
.. code-block:: xml
@@ -1188,7 +1188,7 @@ easy to use in your application.
-
+
@@ -1202,7 +1202,7 @@ easy to use in your application.
'AppBundle\Form\Type\TaskType'
)
->addTag('form.type', array(
- 'alias' => 'task',
+ 'alias' => 'app_task',
))
;
diff --git a/cookbook/form/create_custom_field_type.rst b/cookbook/form/create_custom_field_type.rst
index 91dfe580c5e..d4434f2929d 100644
--- a/cookbook/form/create_custom_field_type.rst
+++ b/cookbook/form/create_custom_field_type.rst
@@ -311,14 +311,14 @@ the ``genders`` parameter value as the first argument to its to-be-created
arguments:
- "%genders%"
tags:
- - { name: form.type, alias: gender }
+ - { name: form.type, alias: app_gender }
.. code-block:: xml
%genders%
-
+
.. code-block:: php
@@ -332,7 +332,7 @@ the ``genders`` parameter value as the first argument to its to-be-created
array('%genders%')
))
->addTag('form.type', array(
- 'alias' => 'gender',
+ 'alias' => 'app_gender',
))
;
diff --git a/cookbook/form/create_form_type_extension.rst b/cookbook/form/create_form_type_extension.rst
index 75c5d0a63db..5666c689e89 100644
--- a/cookbook/form/create_form_type_extension.rst
+++ b/cookbook/form/create_form_type_extension.rst
@@ -312,7 +312,7 @@ next to the file field. For example::
public function getName()
{
- return 'media';
+ return 'app_media';
}
}
diff --git a/cookbook/form/dynamic_form_modification.rst b/cookbook/form/dynamic_form_modification.rst
index 50e8df4c25d..0a73b9d5d8f 100644
--- a/cookbook/form/dynamic_form_modification.rst
+++ b/cookbook/form/dynamic_form_modification.rst
@@ -240,7 +240,7 @@ Using an event listener, your form might look like this::
public function getName()
{
- return 'friend_message';
+ return 'app_friend_message';
}
}
@@ -388,7 +388,7 @@ it with :ref:`dic-tags-form-type`.
class: AppBundle\Form\Type\FriendMessageFormType
arguments: ["@security.token_storage"]
tags:
- - { name: form.type, alias: friend_message }
+ - { name: form.type, alias: app_friend_message }
.. code-block:: xml
@@ -396,7 +396,7 @@ it with :ref:`dic-tags-form-type`.
-
+
@@ -404,7 +404,7 @@ it with :ref:`dic-tags-form-type`.
// app/config/config.php
$definition = new Definition('AppBundle\Form\Type\FriendMessageFormType');
- $definition->addTag('form.type', array('alias' => 'friend_message'));
+ $definition->addTag('form.type', array('alias' => 'app_friend_message'));
$container->setDefinition(
'app.form.friend_message',
$definition,
@@ -420,7 +420,7 @@ access to the form factory, you then use::
{
public function newAction(Request $request)
{
- $form = $this->get('form.factory')->create('friend_message');
+ $form = $this->get('form.factory')->create('app_friend_message');
// ...
}
@@ -428,14 +428,14 @@ access to the form factory, you then use::
If you extend the ``Symfony\Bundle\FrameworkBundle\Controller\Controller`` class, you can simply call::
- $form = $this->createForm('friend_message');
+ $form = $this->createForm('app_friend_message');
You can also easily embed the form type into another form::
// inside some other "form type" class
public function buildForm(FormBuilderInterface $builder, array $options)
{
- $builder->add('message', 'friend_message');
+ $builder->add('message', 'app_friend_message');
}
.. _cookbook-form-events-submitted-data: