1 block_example.module block_example_block_save($delta = '', &$edit = array())

Implements hook_block_save().

This hook declares how the configured options for a block provided by this module are saved. This hook is optional if we do not wish to modify the way values are saved. Values are saved into the layout configuration file that contains this block.

Related topics

File

modules/examples/block_example/block_example.module, line 138
Hook implementations for the Block Example module.

Code

function block_example_block_save($delta = '', &$edit = array()) {
  // We need to check $delta to make sure we are saving the right block.
  if ($delta == 'example_configurable_text') {
    // Cast the checkbox option to a boolean value before saving.
    $edit['uppercase'] = (bool) $edit['uppercase'];
  }
}