- Issue created by @DrDam
The current state of the solution is based on some hacks on Core and CROP, with some evolution on theses elements, the whole integration will be "cleaner" for D11
<!--break-->- Find a way to "split" some control elements out of the "deliver" method into protected methods in order to more easily extends the method.
- exemple : L114-125 => check for scheme throwing NotFoundHttpException, can be a protected method out side of the deliver method
==>> Update https://www.drupal.org/project/drupal/issues/2685905#comment-15756509 ✨ Refactor ImageStyleDownloadController so derivatives can be generated by contrib modules Needs work
On ImageStyleInterface and ImageStyle class
- Add an optional string parmeter "context" on the "createDerivative" method, this parameter will be passed to effects.
On ImageEffectInterface and subclasses
- Add an optional string parmeter "context" on the "applyEffect" method (get from ImageStyle::createDerivative method)
=> can be difficult because inject regretion in all EffectPlugins
==>> patch : 2-add_context_to_image_style.patch
On Crop API & plugins
- Add an optional string parmeter "context" on the Crop::findCrop method, in order to load contextual CROP (currently : context = crop_id)
- In applyEffect method on Effect Plugin Classes, send the "context" to the Crop::findCrop method
==>> patch : 3-focal_point.patch
==>> patch : 3-crop.patch (need to be applied after "provide_contextual_capability_to_crops"
On CropEntity
- Find a better way to "obfuscate" the context (not using the crop_id anymore) that will use as less resources as possible on crop search/load, and not a long hash (to have the "cleanest" filename).
Active
2.2
Code