Skip to content

Commit

Permalink
Move the username form type to FOS\UserBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jul 18, 2011
1 parent efbbd7e commit 7a63a4c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 73 deletions.
62 changes: 0 additions & 62 deletions DataTransformer/UsernameToUserTransformer.php

This file was deleted.

4 changes: 2 additions & 2 deletions FormType/NewThreadMessageFormType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class NewThreadMessageFormType extends AbstractType
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('recipient', 'ornicar_message.username')
->add('recipient', 'fos_user_username')
->add('subject', 'text')
->add('body', 'textarea');
}

public function getName()
{
return 'ornicar_message_new_thread';
Expand Down
9 changes: 0 additions & 9 deletions Resources/config/form.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,6 @@
<argument type="service" id="ornicar_message.participant_provider" />
</service>

<service id="ornicar_message.username_to_user_transformer" class="Ornicar\MessageBundle\DataTransformer\UsernameToUserTransformer" public="false">
<argument type="service" id="fos_user.user_manager" />
</service>

<service id="ornicar_message.username_form_type" class="Ornicar\MessageBundle\FormType\UsernameFormType">
<tag name="form.type" alias="ornicar_message.username" />
<argument type="service" id="ornicar_message.username_to_user_transformer" />
</service>

</services>

</container>

0 comments on commit 7a63a4c

Please sign in to comment.