NullTestImageEffect.php
Same filename in other branches
- 9 core/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/NullTestImageEffect.php
- 8.9.x core/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/NullTestImageEffect.php
- 10 core/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/NullTestImageEffect.php
Namespace
Drupal\image_module_test\Plugin\ImageEffectFile
-
core/
modules/ image/ tests/ modules/ image_module_test/ src/ Plugin/ ImageEffect/ NullTestImageEffect.php
View source
<?php
declare (strict_types=1);
namespace Drupal\image_module_test\Plugin\ImageEffect;
use Drupal\Core\Image\ImageInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\image\Attribute\ImageEffect;
use Drupal\image\ImageEffectBase;
/**
* Performs no operation on an image resource.
*/
class NullTestImageEffect extends ImageEffectBase {
/**
* {@inheritdoc}
*/
public function transformDimensions(array &$dimensions, $uri) {
// Unset image dimensions.
$dimensions['width'] = $dimensions['height'] = NULL;
}
/**
* {@inheritdoc}
*/
public function applyEffect(ImageInterface $image) {
return TRUE;
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
NullTestImageEffect | Performs no operation on an image resource. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.