I have web site based on Symfony 3.4 and Sonata Admin with SonataNews Bundle, SonataUser bundle etc. Everything works fine.
Now my customer wants web shop, and I choose aimeos for symfony. Now the problem is with users. In fos_user I have:
fos_user:
db_driver: orm # other valid values are 'mongodb' and 'couchdb'
firewall_name: main
#user_class: Sonata\UserBundle\Entity\BaseUser
user_class: Application\Sonata\UserBundle\Entity\User
group:
group_class: Application\Sonata\UserBundle\Entity\Group
group_manager: sonata.user.orm.group_manager # If you're using doctrine orm (use sonata.user.mongodb.group_manager for mongodb)
service:
user_manager: sonata.user.orm.user_manager
from_email:
address: "example@example.com"
sender_name: "My website"
but Aimeos wants configuration like this:
fos_user:
db_driver: orm
user_class: Aimeos\ShopBundle\Entity\FosUser
firewall_name: aimeos_myaccount
from_email:
address: "me@example.com"
sender_name: "Test shop"
different firewall and user_class. If I change this, then there are problems with sonata admin, because some sonata bundles use SonataUserBundle, like News bundle for example. Without user_class: Aimeos\\ShopBundle\\Entity\\FosUser, aimeos doesn't work.
My question is: Is it possible (and how) to tell Aimeos to use SonataUserBundle? Or somehow extend this classes?
扩展Sonata用户实体类,并从Aimeos FosUser实体类添加其他属性的代码
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.