function hook_image_effect_info_alter

Same name in other branches
  1. 7.x modules/image/image.api.php \hook_image_effect_info_alter()
  2. 9 core/modules/image/image.api.php \hook_image_effect_info_alter()
  3. 8.9.x core/modules/image/image.api.php \hook_image_effect_info_alter()
  4. 10 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

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.