You are here

function imagecache_asset_settings in Asset 6

Same name in this branch
  1. 6 modules/asset_imagecache.inc \imagecache_asset_settings()
  2. 6 inc/modules/asset_imagecache.inc \imagecache_asset_settings()
Same name and namespace in other branches
  1. 5.2 modules/asset_imagecache.inc \imagecache_asset_settings()
  2. 5 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);
}