function module_builder_admin_settings in Module Builder 7
Same name and namespace in other branches
- 5 module_builder.module \module_builder_admin_settings()
- 6.2 includes/module_builder.admin.inc \module_builder_admin_settings()
- 7.2 includes/module_builder.admin.inc \module_builder_admin_settings()
Admin settings page.
Related topics
1 string reference to 'module_builder_admin_settings'
- module_builder_menu in ./
module_builder.module - Implementation of hook_menu().
File
- includes/
module_builder.admin.inc, line 15 - Menu callbacks for admin pages.
Code
function module_builder_admin_settings($form_state) {
$form['module_builder_hooks_directory'] = array(
'#type' => 'textfield',
'#title' => t('Path to hook documentation directory'),
'#description' => t('Subdirectory in the directory "%dir" where local copies of hook documentation should be stored.', array(
'%dir' => file_directory_path() . '/',
)),
'#default_value' => variable_get('module_builder_hooks_directory', 'hooks'),
);
$form['module_builder_write_directory'] = array(
'#type' => 'textfield',
'#title' => t('Path to write module files'),
'#description' => t('Subdirectory in the directory "%dir" where module files should be written.', array(
'%dir' => file_directory_path() . '/',
)),
'#default_value' => variable_get('module_builder_write_directory', 'modules'),
);
$form['module_builder_header'] = array(
'#type' => 'textarea',
'#title' => t('Module header'),
'#description' => t('This is the code that will be displayed at the top of your module file.'),
'#rows' => 15,
'#default_value' => variable_get('module_builder_header', MODULE_BUILDER_HEADER_DEFAULT),
);
$form['module_builder_footer'] = array(
'#type' => 'textarea',
'#title' => t('Module footer'),
'#description' => t('This is the code that will be displayed at the bottom of your module file.'),
'#rows' => 15,
'#default_value' => variable_get('module_builder_footer', ''),
);
$form['module_builder_detail'] = array(
'#type' => 'radios',
'#title' => t('Code detail level'),
'#description' => t('This setting will either display or suppress additional explanatory comments in the resulting module code to help new developers.'),
'#options' => array(
1 => t("<strong>Beginner</strong>: I'm just starting out with Drupal development; please display lots of helpful comments in my module code!"),
0 => t("<strong>Advanced</strong>: I already know what I'm doing; don't put in a bunch of crap in my module file that I don't need!"),
),
'#default_value' => variable_get('module_builder_detail', 0),
);
/*
$form['module_builder_download'] = array(
'#type' => 'radios',
'#title' => t('Download module file checkbox defaults to'),
'#description' => t('When checked, this will automatically generate your module file for you and prompt your browser to download it.'),
'#options' => array(
1 => t('Enabled'),
0 => t('Disabled'),
),
'#default_value' => variable_get('module_builder_download', 1),
);
*/
return system_settings_form($form);
}