function space_customizer_menu::form in Spaces 6
Same name and namespace in other branches
- 5.2 spaces.module \space_customizer_menu::form()
- 6.2 spaces.spaces.inc \space_customizer_menu::form()
Overrides space_customizer::form
File
- ./
spaces.module, line 587
Class
- space_customizer_menu
- Customizer for feature menus.
Code
function form($space, $feature) {
$features = spaces_features();
$f = $features[$feature];
$form = array();
// Customize menus
if (isset($f->spaces['menu']) && count($f->spaces['menu'])) {
$feature_menu = array();
// Get customized values
$feature_menu = $f->spaces['menu'];
$feature_menu = $this
->customize($space, $feature, $feature_menu);
foreach ($feature_menu as $key => $item) {
$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'],
);
}
}
return $form;
}