function iek_get_overlays in Image effect kit 8
Same name and namespace in other branches
- 7 iek.module \iek_get_overlays()
Gets a list of available image overlays.
Parameters
string $overlay_name: A overlay name if you just want to get a particular image overlay. Leaves empty if you want to get all available overlays.
Return value
array Particular overlays if the 'overlay_name' is given. All available overlays otherwise.
3 calls to iek_get_overlays()
- ImageOverlay::execute in src/
Plugin/ ImageToolkit/ Operation/ gd/ ImageOverlay.php - Performs the actual manipulation on the image.
- ImageOverlayEffect::buildConfigurationForm in src/
Plugin/ ImageEffect/ ImageOverlayEffect.php - Form constructor.
- ImageOverlayEffect::getSummary in src/
Plugin/ ImageEffect/ ImageOverlayEffect.php - Returns a render array summarizing the configuration of the image effect.
File
- ./
iek.module, line 249 - Contains "iek" module.
Code
function iek_get_overlays($overlay_name = '') {
$overlays = \Drupal::moduleHandler()
->invokeAll('iek_overlay');
// Invoke hook_iek_overlay_alter().
// To allow all modules to alter the overlays.
\Drupal::moduleHandler()
->alter('iek_overlay', $overlays);
if (!empty($overlay_name)) {
foreach ($overlays as $item1) {
foreach ($item1['children'] as $item2) {
if ($item2['name'] == $overlay_name) {
return $item2;
}
}
}
}
return $overlays;
}