function spaces_preset_save_from_space in Spaces 6.3
Same name and namespace in other branches
- 7.3 spaces.module \spaces_preset_save_from_space()
- 7 spaces.module \spaces_preset_save_from_space()
Save a preset's values from a given space object.
Parameters
$preset: The preset object to be saved.
$space: The space object whose values should be used for the preset.
File
- ./
spaces.module, line 286
Code
function spaces_preset_save_from_space($preset, $space) {
$space
->activate();
foreach (array_keys(spaces_controllers()) as $controller) {
$preset->value[$controller] = array_merge($space->controllers->{$controller}
->get(NULL, 'preset'), $space->controllers->{$controller}
->get(NULL, 'space'));
}
spaces_preset_save($preset);
}