hook_block_save

  1. drupal
    1. 8
    2. 7
Versions
8 – 7 hook_block_save($delta = '', $edit = array())

Save the configuration options from hook_block_configure().

This hook allows you to save the block-specific configuration settings defined within your hook_block_configure().

Parameters

$delta Which block is being configured. This is a unique identifier for the block within the module, defined in hook_block_info().

$edit The submitted form data from the configuration form.

For a detailed usage example, see block_example.module.

See also

hook_block_configure()

hook_block_info()

Related topics

Code

modules/block/block.api.php, line 180

<?php
function hook_block_save($delta = '', $edit = array()) {
  // This example comes from node.module.
  if ($delta == 'recent') {
    variable_set('node_recent_block_count', $edit['node_recent_block_count']);
  }
}
?>