function hook_block_save

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

9 functions implement hook_block_save()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

aggregator_block_save in drupal/core/modules/aggregator/aggregator.module
Implements hook_block_save().
block_block_save in drupal/core/modules/block/block.module
Implements hook_block_save().
block_custom_block_save in drupal/core/modules/block/block.module
Saves a user-created block in the database.
book_block_save in drupal/core/modules/book/book.module
Implements hook_block_save().
comment_block_save in drupal/core/modules/comment/comment.module
Implements hook_block_save().

... See full list

2 invocations of hook_block_save()
block_admin_configure_submit in drupal/core/modules/block/block.admin.inc
Form submission handler for block_admin_configure().
StatisticsReportsTest::testPopularContentBlock in drupal/core/modules/statistics/lib/Drupal/statistics/Tests/StatisticsReportsTest.php
Tests the "popular content" block.

File

drupal/core/modules/block/block.api.php, line 190
Hooks provided by the Block module.

Code

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']);
  }
}