I'd like to add an extra image driver.
This seems possible as the image manager is prepared to handle multiple drivers and extra drivers can be added via container
However, the admin GUI to configure the default driver does give me some headache:
The option does use a PHP callback and as the entity does not extend the callback class before executing the callback I can't seem to find an easy way to make this extra driver appear there and stikl have the setting validated properly
My thoughts so far :
Currently I'd favour option # 3, but basically none of those approaches does not seem kinda hacky to me
Any other ideas or hints how this is supposed to work @Chris D ?
This seems possible as the image manager is prepared to handle multiple drivers and extra drivers can be added via container
imageManager.extraDrivers
.However, the admin GUI to configure the default driver does give me some headache:
The option does use a PHP callback and as the entity does not extend the callback class before executing the callback I can't seem to find an easy way to make this extra driver appear there and stikl have the setting validated properly
My thoughts so far :
- I could leave the option untouched and set the default driver via container
imageManager.defaultDriver
, effectively making the option unfunctional - I could patch the option definition and modify the callback
- I could extend
XF\Entity\Option
and override methodrenderDisplayCallback
to make the callback use class extensions
This in turn would allow me to extendXF\Option\ImageLibrary
and add the necessary code - I could just add my driver to template
option_template_imageLibrary
without validation if it can be used
Currently I'd favour option # 3, but basically none of those approaches does not seem kinda hacky to me
Any other ideas or hints how this is supposed to work @Chris D ?