function space_customizer_menu::form in Spaces 5.2
Same name and namespace in other branches
- 6 spaces.module \space_customizer_menu::form()
- 6.2 spaces.spaces.inc \space_customizer_menu::form()
Overrides space_customizer::form
File
- ./
spaces.module, line 429
Class
- space_customizer_menu
- Customizer for feature menus.
Code
function form($space, $feature) {
$features = spaces_features();
$f = $features[$feature];
// Customize menus
if (isset($f->spaces['menu']) && count($f->spaces['menu'])) {
// Get customized values
$feature_menu = $f->spaces['menu'];
$feature_menu = $this
->customize($space, $feature, $feature_menu);
$form = array();
foreach ($feature_menu as $path => $item) {
$form[$path] = array(
'#title' => $path,
'#type' => 'fieldset',
'#tree' => TRUE,
);
$form[$path]['title'] = array(
'#title' => t('Title'),
'#type' => 'textfield',
'#size' => 40,
'#maxlength' => 255,
'#default_value' => $item['title'],
);
}
}
return $form;
}