You are here

function hook_image_effect_info_alter in Drupal 8

Same name and namespace in other branches
  1. 7 modules/image/image.api.php \hook_image_effect_info_alter()
  2. 9 core/modules/image/image.api.php \hook_image_effect_info_alter()

Alter the information provided in \Drupal\image\Annotation\ImageEffect.

Parameters

$effects: The array of image effects, keyed on the machine-readable effect name.

Related topics

1 function implements hook_image_effect_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

image_module_test_image_effect_info_alter in core/modules/image/tests/modules/image_module_test/image_module_test.module
Implements hook_image_effect_info_alter().
1 invocation of hook_image_effect_info_alter()
ImageEffectManager::__construct in core/modules/image/src/ImageEffectManager.php
Constructs a new ImageEffectManager.

File

core/modules/image/image.api.php, line 19
Hooks related to image styles and effects.

Code

function hook_image_effect_info_alter(&$effects) {

  // Override the Image module's 'Scale and Crop' effect label.
  $effects['image_scale_and_crop']['label'] = t('Bangers and Mash');
}