function space_customizer_block::submit in Spaces 6
Same name and namespace in other branches
- 6.2 spaces.spaces.inc \space_customizer_block::submit()
Implementation of submit(). Iterate through and only record the aspects of each block that have been customized.
Overrides space_customizer::submit
File
- ./
spaces.module, line 834
Class
- space_customizer_block
- Customizer for feature blocks.
Code
function submit($space, $feature, $value) {
foreach ($value as $region => $blocks) {
foreach ($blocks as $bid => $block) {
foreach (array(
'weight',
'status',
'subject',
) as $key) {
if (isset($block[$key])) {
if ($block[$key] == $block["default_{$key}"]) {
unset($value[$region][$bid][$key]);
}
}
unset($value[$region][$bid]["default_{$key}"]);
}
}
}
return $value;
}