function spaces_customize_form_submit in Spaces 6.2
Same name and namespace in other branches
- 5.2 spaces_admin.inc \spaces_customize_form_submit()
- 6 spaces_admin.inc \spaces_customize_form_submit()
Submit handler for feature customization form.
1 string reference to 'spaces_customize_form_submit'
- spaces_customize_form in ./
spaces_admin.inc - Feature customization form.
File
- ./
spaces_admin.inc, line 780
Code
function spaces_customize_form_submit($form, &$form_state) {
$space = $form_state['values']['space'];
$feature = $form_state['values']['feature'];
// Retrieve customizer values
$customizers = spaces_customizers();
foreach ($customizers as $id => $customizer) {
$space->customizer[$id] = $customizer
->submit($space, $feature, $form_state['values']['customizers'][$id]);
}
// Retrieve setting values
$settings = spaces_feature_settings($feature);
if (!empty($settings)) {
foreach ($settings as $id => $setting) {
$space->settings[$id] = $setting
->submit($space, $form_state['values']['settings'][$id]);
}
}
// Save the space
spaces_save($space);
drupal_set_message(t('Customizations saved for space !title.', array(
'!title' => $space->title,
)));
}