magento-hackathon / m2-content-provisioning

Configure CMS (pages or block) entries via XML and define how them should be deployed.
MIT License
45 stars 19 forks source link

[Media Files] Add an extensibility point to FetchMediaFilesFromContent component #15

Closed roma-glushko closed 5 years ago

roma-glushko commented 5 years ago

Current Behaviour Currently, deployment of media files works only for media that is added by {{media}} directive.

Desired Behaviour The {{media}} directive is not enough usually to cover all CMS content management needs. On the practice, media files can be used in CMS content from widgets as well.

It can be helpful to have an extensible point in FetchMediaFilesFromContent component to be able to compose custom media file queries to be able to fetch files from different places (like custom widget parameters)

roma-glushko commented 5 years ago

Hi @vadimjustus as a solution, I would use the composite pattern and give consumers an ability to register custom components via di.xml. Would it work for you?

roma-glushko commented 5 years ago

Hi @vadimjustus this task is ready. Can you please review it?

vadimjustus commented 5 years ago

Hi @roma-glushko, thank you for your PR. Great job 👍