function session_api_settings_form in Session API 5
Same name and namespace in other branches
- 6 session_api.admin.inc \session_api_settings_form()
- 7 session_api.admin.inc \session_api_settings_form()
Session API admin settings form.
1 string reference to 'session_api_settings_form'
- session_api_menu in ./
session_api.module - Implementation of hook_menu().
File
- ./
session_api.admin.inc, line 12 - Session API admin functions.
Code
function session_api_settings_form() {
// find modules that implement hook_session_api_cleanup()
$modules = module_implements('session_api_cleanup');
$form['maintenance'] = array(
'#type' => 'fieldset',
'#title' => t('Maintenance Tasks'),
'#description' => t('The following modules have jobs that are run on cron to cleanup expired session information.'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
// throw Session API to the top
array_unshift($modules, 'session_api');
$modules = array_unique($modules);
foreach ($modules as $module) {
// gather module-specific information about the cleanup process each on
// implements.
$info = module_invoke($module, 'session_api_cleanup', 'info');
$form['maintenance']['session_api_run_cron_' . $module] = array(
'#title' => $info['title'],
'#description' => $info['description'],
'#type' => 'checkbox',
'#default_value' => variable_get('session_api_run_cron_' . $module, FALSE),
);
}
return system_settings_form($form);
}