function spaces_overrides_revert in Spaces 6.3
Same name and namespace in other branches
- 7.3 spaces.admin.inc \spaces_overrides_revert()
- 7 spaces.admin.inc \spaces_overrides_revert()
Submit handler for reverting overrides.
1 string reference to 'spaces_overrides_revert'
- spaces_overrides_form in ./
spaces.admin.inc - Form for managing space override values.
File
- ./
spaces.admin.inc, line 220
Code
function spaces_overrides_revert(&$form, &$form_state) {
$space = $form_state['values']['space'];
foreach (array_keys(spaces_controllers()) as $controller) {
$remove = !empty($form_state['values'][$controller]) ? array_filter($form_state['values'][$controller]) : array();
foreach (array_keys($remove) as $key) {
$space->controllers->{$controller}
->del($key);
}
}
drupal_set_message(t('Saved %title.', array(
'%title' => $space
->title(),
)));
}