You are here

function imagecache_asset_settings in Asset 5.2

Same name and namespace in other branches
  1. 5 modules/asset_imagecache.inc \imagecache_asset_settings()
  2. 6 modules/asset_imagecache.inc \imagecache_asset_settings()
  3. 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_get_presets();
  foreach ($presets as $id => $name) {
    $formats[$name] = array(
      'name' => $name . ' (imagecache)',
      'types' => array(
        'jpg',
        'gif',
        'png',
      ),
      'description' => _imagecache_asset_description($id),
    );
    $form['asset_imagecache_preset_' . $id] = array(
      '#type' => 'checkbox',
      '#title' => $name,
      '#default_value' => variable_get('asset_imagecache_preset_' . $id, 1),
    );
  }
  return system_settings_form($form);
}