简体   繁体   中英

Symfony2 : Sonata Admin Bundle. What is the persistence Service?

I'm deseperatly trying to make the Admin Bundle For several days now, and I'm stuck at some point. I decided to re-start from the begining.

I've installed all the vendors conrrectly, and now, I can already access the admin dashboard by visiting the url: http://yoursite.local/admin/dashboard . (nothing much interesting in there, only the header.)

So on step 2.2 , they want me to Setup the persistence service (ORM, ODM, ...), I don't know what it is used for and, last time, since they say "SonataAdminBundle does not impose persistance service (service for handling and controlling your models)" I've skippedths step..... but maybe I shouldn t have done so ..

Could anyone tell me what it is used for please ? should I use it, why and what for ? Maybe that's the reason why I can't make it work.

Thank You !

You left out an important part of that quote...

SonataAdminBundle does not impose persistance service (service for handling and controlling your models), ... ...

They're not saying you shouldn't use a persistence service, they're saying that the choice of which persistence service is up to you (should your app require it, and if your app uses a database, it's safe to say that it will require it).

...therefore you can use the following bundles officially supported by Sonata Project's admin bundle:
- SonataDoctrineORMAdminBundle
- SonataDoctrineMongoDBAdminBundle
- SonataDoctrinePhpcrAdminBundle

I haven't used Sonata Admin bundle, but it definitely sounds like you shouldn't have skipped this step :-)

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