function image_effect_definition_load

Loads the definition for an image effect.

The effect definition is a set of core properties for an image effect, not containing any user-settings. The definition defines various functions to call when configuring or executing an image effect. This loader is mostly for internal use within image.module. Use image_effect_load() or entity_load() to get image effects that contain configuration.

Parameters

$effect: The name of the effect definition to load.

Return value

An array containing the image effect definition with the following keys:

  • "effect": The unique name for the effect being performed. Usually prefixed with the name of the module providing the effect.
  • "module": The module providing the effect.
  • "help": A description of the effect.
  • "function": The name of the function that will execute the effect.
  • "form": (optional) The name of a function to configure the effect.
  • "summary": (optional) The name of a theme function that will display a one-line summary of the effect. Does not include the "theme_" prefix.
4 calls to image_effect_definition_load()
ImageStyleStorageController::attachLoad in drupal/core/modules/image/lib/Drupal/image/ImageStyleStorageController.php
Overrides \Drupal\Core\Config\Entity\ConfigStorageController::attachLoad().
image_effect_load in drupal/core/modules/image/image.module
Loads a single image effect.
image_help in drupal/core/modules/image/image.module
Implements hook_help().
image_style_form_add_submit in drupal/core/modules/image/image.admin.inc
Submit handler for adding a new image effect to an image style.

File

drupal/core/modules/image/image.module, line 889
Exposes global functionality for creating image styles.

Code

function image_effect_definition_load($effect) {
  $definitions = image_effect_definitions();
  return isset($definitions[$effect]) ? $definitions[$effect] : FALSE;
}