function space_customizer_menu::form in Spaces 6.2
Same name and namespace in other branches
- 5.2 spaces.module \space_customizer_menu::form()
- 6 spaces.module \space_customizer_menu::form()
Overrides space_customizer::form
File
- ./
spaces.spaces.inc, line 67
Class
- space_customizer_menu
- Customizer for feature menus.
Code
function form($space, $feature) {
$menu = spaces_features_items('menu', $feature);
if (!empty($menu)) {
$form = array();
$menu_items = menu_navigation_links('features');
$default_items = $menu_items;
$this
->customize($space, $menu_items);
foreach ($menu_items as $key => $item) {
if (in_array($item['href'], $menu)) {
$form[$item['href']] = array(
'#title' => $item['href'],
'#type' => 'fieldset',
'#tree' => TRUE,
);
$form[$item['href']]['title'] = array(
'#title' => t('Title'),
'#type' => 'textfield',
'#size' => 40,
'#maxlength' => 255,
'#default_value' => $item['title'],
);
$form[$item['href']]['default'] = array(
'#type' => 'value',
'#value' => $default_items[$key]['title'],
);
}
}
}
return $form;
}