Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 303110

ImageStyle to be accessible from ImageEffect plugins

$
0
0

Problem/Motivation

At the moment it is possible to set/getThirdPartySetting on the image style, but they are not visible to the effects.

Proposed resolution

Introduce an ImageStyleAwareInterface and trait so that effects that need to access TPSs on the ImageStyle can do so. Change the ImageEffectPluginCollection so to inject the image style id to image style aware effect plugins on initialization.

Remaining tasks

User interface changes

None.

API changes

Introduced a new ImageStyleAwareInterface with a public setImageStyleId() method.

Original report by @zuuperman

There are some use cases for effects, that require the style information to be given as argument to the effect callbacks. This is mostly the case when the effect settings can change per file.

For example: http://drupal.org/node/1250506#comment-4889248

The same goes for dimension callbacks, but i will update this in #1364670: image_style_transform_dimensions unable to deal with all effects.


Viewing all articles
Browse latest Browse all 303110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>