function context_condition_menu::settings_form in Context 6.3
Settings form for variables.
Overrides context_condition::settings_form
File
- plugins/
context_condition_menu.inc, line 62
Class
- context_condition_menu
- Expose menu items as a context condition.
Code
function settings_form() {
// Get the list of menus in the system.
$menus = array_values(menu_get_menus());
// Convert the list to the format menu_name => menu_name.
$options = array_combine($menus, $menus);
$form = array();
$form['context_condition_menu_selections'] = array(
'#title' => t('Menus'),
'#type' => 'select',
'#multiple' => TRUE,
'#options' => $options,
'#required' => TRUE,
'#default_value' => variable_get('context_condition_menu_selections', $options),
'#description' => t('Select one or more Drupal menus to use during Menu Context condition checks. If none are selected, all of the menus are used.'),
);
return $form;
}