Skip to content

Commit

Permalink
[Form] Renamed field type name "entity_id" to "entity_identifier"
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregwar committed Aug 23, 2011
1 parent 295bd6d commit 38713e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Exception\FormException;

class EntityIdType extends AbstractType
class EntityIdentifierType extends AbstractType
{
protected $registry;

Expand Down Expand Up @@ -50,7 +50,7 @@ public function getDefaultOptions(array $options)
$options = array_replace($defaultOptions, $options);

if (null === $options['class']) {
throw new FormException('You must provide a class option for the entity_id field');
throw new FormException('You must provide a class option for the entity_identifier field');
}

return $defaultOptions;
Expand All @@ -63,6 +63,6 @@ public function getParent(array $options)

public function getName()
{
return 'entity_id';
return 'entity_identifier';
}
}
4 changes: 2 additions & 2 deletions src/Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
<argument type="service" id="doctrine" />
</service>

<service id="form.type.entity_id" class="Symfony\Bridge\Doctrine\Form\Type\EntityIdType">
<tag name="form.type" alias="entity_id" />
<service id="form.type.entity_identifier" class="Symfony\Bridge\Doctrine\Form\Type\EntityIdentifierType">
<tag name="form.type" alias="entity_identifier" />
<argument type="service" id="doctrine" />
</service>

Expand Down

0 comments on commit 38713e2

Please sign in to comment.