function imagecache_asset_settings in Asset 5
Same name and namespace in other branches
- 5.2 modules/asset_imagecache.inc \imagecache_asset_settings()
- 6 modules/asset_imagecache.inc \imagecache_asset_settings()
- 6 inc/modules/asset_imagecache.inc \imagecache_asset_settings()
File
- modules/
asset_imagecache.inc, line 3
Code
function imagecache_asset_settings() {
$form[] = array(
'#value' => '<p>Select which imagecache presets should be available to use as asset formatters.</p>',
);
$presets = imagecache_presets();
foreach ($presets as $preset) {
$formats[$preset['presetname']] = array(
'name' => $preset['presetname'] . ' (imagecache)',
'types' => array(
'jpg',
'gif',
'png',
),
);
$form['asset_imagecache_preset_' . $preset['presetid']] = array(
'#type' => 'checkbox',
'#title' => $preset['presetname'],
'#default_value' => variable_get('asset_imagecache_preset_' . $preset['presetid'], 1),
);
}
return system_settings_form($form);
}