function asset_embed_asset_settings in Asset 5
Same name and namespace in other branches
- 6 asset_embed/asset_embed.module \asset_embed_asset_settings()
File
- asset_embed/
asset_embed.module, line 56 - Asset Embed Module
Code
function asset_embed_asset_settings() {
$providers = asset_embed_list_providers(TRUE);
if (is_array($providers)) {
foreach ($providers as $provider => $name) {
$form[$provider] = array(
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => !variable_get('asset_embed_' . $provider . '_enabled', 1),
'#title' => $name,
'#tree' => FALSE,
);
$form[$provider]['asset_embed_' . $provider . '_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Enabled'),
'#default_value' => variable_get('asset_embed_' . $provider . '_enabled', 1),
'#return_value' => 1,
);
$form[$provider] = array_merge($form[$provider], (array) asset_embed_invoke($provider, 'settings'));
}
}
else {
$form[] = array(
'#value' => t('No Providers Available'),
);
}
return system_settings_form($form);
}