You are here

public function ImageStyle::getEffects in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::getEffects()
  2. 10 core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::getEffects()

Returns the image effects for this style.

Return value

\Drupal\image\ImageEffectPluginCollection|\Drupal\image\ImageEffectInterface[] The image effect plugin collection.

Overrides ImageStyleInterface::getEffects

4 calls to ImageStyle::getEffects()
ImageStyle::createDerivative in core/modules/image/src/Entity/ImageStyle.php
Creates a new image derivative based on this image style.
ImageStyle::getDerivativeExtension in core/modules/image/src/Entity/ImageStyle.php
Determines the extension of the derivative without generating it.
ImageStyle::getPluginCollections in core/modules/image/src/Entity/ImageStyle.php
Gets the plugin collections used by this object.
ImageStyle::transformDimensions in core/modules/image/src/Entity/ImageStyle.php
Determines the dimensions of this image style.

File

core/modules/image/src/Entity/ImageStyle.php, line 400

Class

ImageStyle
Defines an image style configuration entity.

Namespace

Drupal\image\Entity

Code

public function getEffects() {
  if (!$this->effectsCollection) {
    $this->effectsCollection = new ImageEffectPluginCollection($this
      ->getImageEffectPluginManager(), $this->effects);
    $this->effectsCollection
      ->sort();
  }
  return $this->effectsCollection;
}