0

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?

repincln
  • 2,029
  • 5
  • 24
  • 34

1 Answers1

0

Extend the Sonata user entity class and add the code for the additional properties from the Aimeos FosUser entity class

Toco
  • 104
  • 7