You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the projects I'm working on is a paid content model. The application itself is very complex and as such should be decoupled as much as possible from Sylius (it will probably live in a different Kernel).
We want to use Sylius as the "store", but are trying to figure out a way to facilitate the ACL rules for the content. The content is currently produced using Sonata with a bunch of different ContentProvider classes that include things like basic CKEditor, impress.js editor, pdf generator, etc.
The current plan using existing Sylius functionality:
add a product_id to the Content model
add a Product form type to the Content Admin form type.
manage the Product entity in lifecycle events of Content
when an order is paid for, dispatch an event. The Content bundle has a listener that creates ACL entries for any Contents with corresponding product_id.
This feels really clunky. Using all of the Sonata bundles is really heavy. There's two different administration panels. The app itself is not decoupled at all from Sylius, because it needs to listen for those events. It's just a mess.
Enter SyliusACLBundle! (and/or SyliusPaidContentBundle?).
The idea I have is to add something like an accessControls property to Product. So instead of having to do the whole event and listener deal, it would just be a function of a completed order to check if it should create any ACL entries.
A simple AccessControllableInterface in SyliusACLBundle would be created, implemented by any class that contains paid content.
This way, there would be 3 kernels: a BaseKernel that contains all of the bundles shared between Sylius and MyApp, the SyliusKernel, and MyAppKernel. Assets would be properly separated. The list of benefits goes on.
So... I know there are a lot of other things that need to be completed with the existing set of bundles. But does anybody see a purpose for this sort of bundle? Or maybe a better way to make this happen?
The text was updated successfully, but these errors were encountered:
One of the projects I'm working on is a paid content model. The application itself is very complex and as such should be decoupled as much as possible from Sylius (it will probably live in a different
Kernel
).We want to use Sylius as the "store", but are trying to figure out a way to facilitate the ACL rules for the content. The content is currently produced using Sonata with a bunch of different
ContentProvider
classes that include things like basic CKEditor, impress.js editor, pdf generator, etc.The current plan using existing Sylius functionality:
product_id
to theContent
modelProduct
entity in lifecycle events ofContent
product_id
.This feels really clunky. Using all of the Sonata bundles is really heavy. There's two different administration panels. The app itself is not decoupled at all from Sylius, because it needs to listen for those events. It's just a mess.
Enter SyliusACLBundle! (and/or SyliusPaidContentBundle?).
The idea I have is to add something like an
accessControls
property to Product. So instead of having to do the whole event and listener deal, it would just be a function of a completed order to check if it should create any ACL entries.A simple
AccessControllableInterface
in SyliusACLBundle would be created, implemented by any class that contains paid content.This way, there would be 3 kernels: a
BaseKernel
that contains all of the bundles shared between Sylius and MyApp, theSyliusKernel
, andMyAppKernel
. Assets would be properly separated. The list of benefits goes on.So... I know there are a lot of other things that need to be completed with the existing set of bundles. But does anybody see a purpose for this sort of bundle? Or maybe a better way to make this happen?
The text was updated successfully, but these errors were encountered: