function nodehierarchy_admin_settings in Node Hierarchy 7.4
Same name and namespace in other branches
- 5 nodehierarchy.module \nodehierarchy_admin_settings()
- 6.3 nodehierarchy.module \nodehierarchy_admin_settings()
- 6 nodehierarchy.module \nodehierarchy_admin_settings()
- 6.2 nodehierarchy.module \nodehierarchy_admin_settings()
- 7.2 nodehierarchy.module \nodehierarchy_admin_settings()
Helper function generates admin settings page.
1 string reference to 'nodehierarchy_admin_settings'
- nodehierarchy_menu in ./
nodehierarchy.module - Implements hook_menu().
File
- ./
nodehierarchy.admin.inc, line 253 - Admin functions for Node Hierarchy
Code
function nodehierarchy_admin_settings($form, &$form_state) {
$form = array();
// Individual type settings.
$form['nodehierarchy_types'] = array(
'#type' => 'fieldset',
'#title' => t('Node Type Settings'),
'#description' => t('Settings for individual node types. These can also be set in the !ct section.', array(
"!ct" => l(t("Content Types"), "admin/structure/types"),
)),
);
foreach (node_type_get_types() as $key => $type) {
// Individual type settings.
$form['nodehierarchy_types'][$key] = array(
'#type' => 'fieldset',
'#title' => $type->name,
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['nodehierarchy_types'][$key] += _nodehierarchy_get_node_type_settings_form($key, TRUE);
}
// Menu generation.
if (function_exists('menu_parent_options')) {
$form['nodehierarchy_menu'] = array(
'#type' => 'fieldset',
'#title' => t('Node Hierarchy Menu Generation'),
);
$form['nodehierarchy_menu']['nodehierarchy_default_menu_name'] = array(
'#type' => 'select',
'#title' => t('Default parent menu'),
'#options' => menu_get_menus(),
'#default_value' => variable_get('nodehierarchy_default_menu_name', 'navigation'),
'#description' => t('If a menu is created for a node with no parent the new menu item will appear in this menu.'),
);
$form['nodehierarchy_menu']['nodehierarchy_menu_module_edit'] = array(
'#type' => 'checkbox',
'#title' => t('Always show hidden Node Hierarchy menu items on the menu overview forms.'),
'#default_value' => variable_get('nodehierarchy_menu_module_edit', FALSE),
'#description' => t('Allow disabled nodehierarchy menu items to be edited with regular menu items in the menu overview screen. Turn this off if large Node Hierarchy menus are causing memory errors on menu edit screens.'),
);
}
return system_settings_form($form);
}