You are here

public function ImageStyle::getEffects in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::getEffects()
  2. 9 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

7 calls to ImageStyle::getEffects()
ImageStyle::addImageEffect in core/modules/image/src/Entity/ImageStyle.php
Saves an image effect for this style.
ImageStyle::createDerivative in core/modules/image/src/Entity/ImageStyle.php
Creates a new image derivative based on this image style.
ImageStyle::deleteImageEffect in core/modules/image/src/Entity/ImageStyle.php
Deletes an image effect from this style.
ImageStyle::getDerivativeExtension in core/modules/image/src/Entity/ImageStyle.php
Determines the extension of the derivative without generating it.
ImageStyle::getEffect in core/modules/image/src/Entity/ImageStyle.php
Returns a specific image effect.

... See full list

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;
}