ImageEffectInterface
interface ImageEffectInterface implements PluginInspectionInterface, ConfigurableInterface, DependentPluginInterface (View source)
Defines the interface for image effects.
Methods
Gets the definition of the plugin implementation.
Sets the configuration for this plugin instance.
Calculates dependencies for the configured plugin.
Determines the dimensions of the styled image.
Returns the extension of the derivative after applying this image effect.
Returns a render array summarizing the configuration of the image effect.
Returns the image effect label.
Returns the unique ID representing the image effect.
Returns the weight of the image effect.
Sets the weight for this image effect.
Details
string
getPluginId()
Gets the plugin_id of the plugin instance.
array
getPluginDefinition()
Gets the definition of the plugin implementation.
array
getConfiguration()
Gets this plugin's configuration.
setConfiguration(array $configuration)
Sets the configuration for this plugin instance.
array
defaultConfiguration()
Gets default configuration for this plugin.
array
calculateDependencies()
Calculates dependencies for the configured plugin.
Dependencies are saved in the plugin's configuration entity and are used to determine configuration synchronization order. For example, if the plugin integrates with specific user roles, this method should return an array of dependencies listing the specified roles.
bool
applyEffect(ImageInterface $image)
Applies an image effect to the image object.
transformDimensions(array $dimensions, string $uri)
Determines the dimensions of the styled image.
string
getDerivativeExtension(string $extension)
Returns the extension of the derivative after applying this image effect.
array
getSummary()
Returns a render array summarizing the configuration of the image effect.
string
label()
Returns the image effect label.
string
getUuid()
Returns the unique ID representing the image effect.
int|string
getWeight()
Returns the weight of the image effect.
$this
setWeight(int $weight)
Sets the weight for this image effect.