function imagecrop_presets_list in Image javascript crop 6
Get a list of styles suitable for an #options array.
4 calls to imagecrop_presets_list()
- imagecrop_form_alter in ./
imagecrop.module - Implementation of hook_form_alter(). Hook into several existing image modules/fields.
- imagecrop_reuse_form in ./
imagecrop_actions.inc - Settings form for reüsing a crop selection.
- imagecrop_settings in ./
imagecrop.admin.inc - Imagecrop settings page
- imagecrop_widget_form in ./
imagecrop.module - Configuration form for editing Imagecrop settings for a field instance.
File
- ./
imagecrop.module, line 262 - Provides a javascript toolbox through an imagecache action.
Code
function imagecrop_presets_list() {
$presets = array();
foreach (imagecache_presets() as $preset) {
foreach ($preset['actions'] as $action) {
if ($action['action'] == 'imagecrop_javascript') {
$presets[$preset['presetname']] = $preset['presetname'];
}
}
}
return $presets;
}