From f76ff18a7e975cbab02e93fd5b0b2f6541b28da1 Mon Sep 17 00:00:00 2001 From: "Andrew (Andrius) Marcinkevicius" Date: Mon, 19 Jan 2015 09:38:41 +0200 Subject: [PATCH] Remove 'acme' --- cookbook/form/dynamic_form_modification.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cookbook/form/dynamic_form_modification.rst b/cookbook/form/dynamic_form_modification.rst index 462d6a1f7d6..92d7521f4e4 100644 --- a/cookbook/form/dynamic_form_modification.rst +++ b/cookbook/form/dynamic_form_modification.rst @@ -246,7 +246,7 @@ Using an event listener, your form might look like this:: public function getName() { - return 'acme_friend_message'; + return 'friend_message'; } public function setDefaultOptions(OptionsResolverInterface $resolver) @@ -389,19 +389,19 @@ it with :ref:`dic-tags-form-type`. # app/config/config.yml services: - acme.form.friend_message: + app.form.friend_message: class: AppBundle\Form\Type\FriendMessageFormType arguments: ["@security.context"] tags: - - { name: form.type, alias: acme_friend_message } + - { name: form.type, alias: friend_message } .. code-block:: xml - + - + @@ -409,9 +409,9 @@ it with :ref:`dic-tags-form-type`. // app/config/config.php $definition = new Definition('AppBundle\Form\Type\FriendMessageFormType'); - $definition->addTag('form.type', array('alias' => 'acme_friend_message')); + $definition->addTag('form.type', array('alias' => 'friend_message')); $container->setDefinition( - 'acme.form.friend_message', + 'app.form.friend_message', $definition, array('security.context') ); @@ -425,7 +425,7 @@ access to the form factory, you then use:: { public function newAction(Request $request) { - $form = $this->get('form.factory')->create('acme_friend_message'); + $form = $this->get('form.factory')->create('friend_message'); // ... } @@ -433,14 +433,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('acme_friend_message'); + $form = $this->createForm('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', 'acme_friend_message'); + $builder->add('message', 'friend_message'); } .. _cookbook-form-events-submitted-data: