1 block_legacy.class.inc | BlockLegacy::formSubmit($form, &$form_state) |
Submit handler to save the form settings.
Overrides Block::formSubmit
File
- core/
modules/ layout/ includes/ block_legacy.class.inc, line 86 - Class that wraps around legacy hook_block_view/config/save() hooks.
Class
- BlockLegacy
- @file Class that wraps around legacy hook_block_view/config/save() hooks.
Code
function formSubmit($form, &$form_state) {
parent::formSubmit($form, $form_state);
// Allow blocks to save their settings into the layout. Because the last
// parameter can be taken in by reference and modified, we cannot use
// module_invoke() here.
if (isset($form_state['values']['block_settings'])) {
$function = $this->module . '_block_save';
if (function_exists($function)) {
$function($this->delta, $form_state['values']['block_settings']);
}
$this->settings['block_settings'] = $form_state['values']['block_settings'];
}
}