function hook_variable_group_info in Variable 7
Same name and namespace in other branches
- 6 variable.api.php \hook_variable_group_info()
- 7.2 variable.api.php \hook_variable_group_info()
Define groups of variables used by a module.
Variable groups are used for presentation only, to display and edit the variables on manageable groups. Groups can define a subset of a module's variables and can be reused accross modules to group related variables.
A form to edit all variables in a group can be generated with:
drupal_get_form('variable_group_form', group_name);
Return value
An array of information defining variable types. The array contains a sub-array for each variable group, with the group as the key. Possible attributes:
- "title": The human readable name of the group. Must be localized.
- "description": The human readable description of the group. Must be localized.
- "access": Permission required to edit group's variables. Will default to 'administer site configuration'.
- "path": Array of administration paths where these variables can be accessed.
8 functions implement hook_variable_group_info()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- forum_variable_group_info in includes/
forum.variable.inc - Implements hook_variable_group_info().
- menu_variable_group_info in includes/
menu.variable.inc - Implements hook_variable_group_info().
- node_variable_group_info in includes/
node.variable.inc - Implements hook_variable_group_info().
- system_variable_group_info in includes/
system.variable.inc - Implements hook_variable_group_info().
- user_variable_group_info in includes/
user.variable.inc - Node module variable groups
File
- ./
variable.api.php, line 185 - Hooks provided by the Variable module.
Code
function hook_variable_group_info() {
$groups['system_site_information'] = array(
'title' => t('Site information'),
'description' => t('Site information and maintenance mode'),
'access' => 'administer site configuration',
'path' => array(
'admin/config/system/site-information',
'admin/config/development/maintenance',
),
);
$groups['system_feed_settings'] = array(
'title' => t('Feed settings'),
'description' => t('Feed settings'),
'access' => 'administer site configuration',
);
return $groups;
}