Loads all effects for an image style.
array $style: The image style (array) to retrieve effects for.
array An array of effects keyed by UUIDs.
function _image_update_get_style_with_effects(array $style) {
// Retrieve image effects.
$effects = array();
$result = db_select('image_effects', NULL, array(
'fetch' => PDO::FETCH_ASSOC,
))
->fields('image_effects')
->condition('isid', $style['isid'])
->execute();
foreach ($result as $effect) {
unset($effect['isid']);
$effect['data'] = unserialize($effect['data']);
// Generate a unique image effect ID for the effect.
$uuid = new Uuid();
$effect['ieid'] = $uuid
->generate();
$effects[$effect['ieid']] = $effect;
}
return $effects;
}