8000 [2.2] [Form] Added form type "entity_identifier" (#1946) by Gregwar · Pull Request #1951 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[2.2] [Form] Added form type "entity_identifier" (#1946) #1951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Prev Previous commit
Next Next commit
Added a RuntimeException when no class is provided
  • Loading branch information
Gregwar committed Aug 21, 2011
commit 0802d83b891b35730aad12db28dbd21c89a39ceb
4 changes: 4 additions & 0 deletions src/Symfony/Bridge/Doctrine/Form/Type/EntityIdType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public function getDefaultOptions(array $options)

$options = array_replace($defaultOptions, $options);

if (null === $options['class']) {
throw new \RunTimeException('You must provide a class option for the entity_id field');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be a FormException instead

}

return $defaultOptions;
}

Expand Down
0