function imagecache_subroutine_form in ImageCache Actions 6.2
Same name and namespace in other branches
- 8 customactions/imagecache_customactions.module \imagecache_subroutine_form()
- 7 customactions/imagecache_customactions.module \imagecache_subroutine_form()
Config form for this preset.
Implementation of imagecache_hook_form()
Parameters
$action array of settings for this action:
Return value
a form definition
File
- customactions/
imagecache_customactions.module, line 178 - Allow advanced users to code their own PHP image manipulation routines as part of imagecache processing.
Code
function imagecache_subroutine_form($action) {
$action = (array) $action;
$form = array();
// List available presets
$presets = array();
foreach (imagecache_presets(TRUE) as $preset) {
$presets[$preset['presetname']] = $preset['presetname'];
}
$form['subroutine_presetname'] = array(
'#type' => 'select',
'#title' => t('Preset to call'),
'#default_value' => $action['subroutine_presetname'],
'#options' => $presets,
);
return $form;
}