function hook_domainform in Domain Access 6.2
Same name and namespace in other branches
- 5 API.php \hook_domainform()
- 7.2 domain.api.php \hook_domainform()
Allows other modules to add elements to the default Domain settings page.
Parameters
&$form: The $form array generated for the Domain settings page. This must be passed by reference. Normally, you should include your form elements inside a new fieldset.
Return value
No return value. The $form is modified by reference, as needed.
2 functions implement hook_domainform()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- domain_settings_domainform in domain_settings/
domain_settings.module - Implements hook_domainform().
- domain_theme_domainform in domain_theme/
domain_theme.module - Implement hook_domainform()
1 invocation of hook_domainform()
- domain_configure_form in ./
domain.admin.inc - FormsAPI for configuring the domain module.
File
- ./
API.php, line 298 - API documentation file.
Code
function hook_domainform(&$form) {
// Add the form element to the main screen.
$form['domain_mymodule'] = array(
'#type' => 'fieldset',
'#title' => t('Mymodule settings'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$options = drupal_map_assoc(array(
-100,
-25,
-10,
-5,
-1,
0,
1,
5,
10,
25,
100,
));
$form['domain_mymodule']['domain_mymodule'] = array(
'#type' => 'select',
'#title' => t('Mymodule settings variable'),
'#options' => $options,
'#default_value' => variable_get('domain_mymodule', 0),
'#description' => t('You description goes here.'),
);
}