function asset_admin_formatter_defaults in Asset 5
Same name and namespace in other branches
- 6 inc/asset.admin.inc \asset_admin_formatter_defaults()
Menu callback for selection of default formatting options.
1 string reference to 'asset_admin_formatter_defaults'
- asset_menu in ./
asset.module - Implementation of hook_menu()
File
- ./
asset.module, line 259
Code
function asset_admin_formatter_defaults() {
$form = array();
$formatters = asset_get_formatters(true);
foreach ($formatters as $type => $exts) {
$form[$type] = array(
'#type' => 'fieldset',
'#title' => $type == '*' ? t('All Types') : $type,
'#tree' => false,
);
foreach ($exts as $ext => $formats) {
$form[$type]['asset_default_formatter_' . $type . '_' . $ext] = array(
'#type' => 'select',
'#title' => $ext,
'#options' => asset_formatter_options($type, $ext),
//'#default_value' => variable_get('asset_default_formatter_'. $type . '_' . $ext, 'asset:link'),
'#default_value' => asset_get_default_formatter($type, $ext, FALSE),
);
$form[$type]['asset_default_formatter_teaser_' . $type . '_' . $ext] = array(
'#type' => 'select',
'#title' => $ext,
'#options' => asset_formatter_options($type, $ext),
//'#default_value' => variable_get('asset_default_formatter_teaser_' . $type . '_' . $ext, 'asset:link'),
'#default_value' => asset_get_default_formatter($type, $ext, TRUE),
);
}
}
return system_settings_form($form);
}