简体   繁体   中英

Can BaseUser of FOSUserBundle extend my own class?

My business case has a hierarchy above the user class (eg a contact only or a member without logins). But now I'm worried how the BaseUser which I have to extend from the FOSUserBundle can extend my Member class?

I don't really understand what is Your member class but in FOS docs its written

Your first job, then, is to create the User class for your application. This class can look and act however you want: add any properties or methods you find useful. This is your User class.

The bundle provides base classes which are already mapped for most fields to make it easier to create your entity.

You don't have to extend BaseUser, it is provided just to make installation easier. it should work if You copy it to Your own bundle and make it extend Your member class.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM