1
我开始一个新项目,使用symfony2 architercture和有用的FosUserBundle来处理我的用户。FOSUserBundle:处理不同类型的用户
在我的应用程序中,我有两种不同类型的用户,分别是:用户和企业用户。
我创建了一个用户窗体(带有嵌入窗体)。 现在我想创建一个EntrepriseForm(使用不同的嵌入式表单),但由于FosUserConfiguration只允许1个注册表单类型,我被卡住了。
如果它可以帮助,这是我的config.yml看起来像:
fos_user:
db_driver: orm # other valid values are 'mongodb', 'couchdb' and 'propel'
firewall_name: main
user_class: Digin\UserBundle\Entity\User
registration:
confirmation:
from_email: # Use this node only if you don't want the global email address for the confirmation email
address: [email protected]
sender_name: xxx
enabled: true # change to true for required email confirmation
template: FOSUserBundle:Registration:email.txt.twig
form:
type: mybundle_user_registration
handler: fos_user.registration.form.handler.default
name: fos_user_registration_form
validation_groups: [Registration]
约我应该怎么做,你知道吗?