function block_custom_block_save

cis7 block.module block_custom_block_save($edit, $delta)
cle7 block.module block_custom_block_save($edit, $delta)
elmsmedia7 block.module block_custom_block_save($edit, $delta)
icor7 block.module block_custom_block_save($edit, $delta)
meedjum_blog7 block.module block_custom_block_save($edit, $delta)
mooc7 block.module block_custom_block_save($edit, $delta)

Saves a user-created block in the database.

Parameters

$edit: Associative array of fields to save. Array keys:

  • info: Block description.
  • body: Associative array of body value and format. Array keys:
    • value: Block contents.
    • format: Filter ID of the filter format for the body.

$delta: Block ID of the block to save.

Return value

Always returns TRUE.

1 call to block_custom_block_save()
block_block_save in modules/block/block.module
Implements hook_block_save().

File

modules/block/block.module, line 559
Controls the visual building blocks a page is constructed with.

Code

function block_custom_block_save($edit, $delta) {
  db_update('block_custom')->fields(array(
    'body' => $edit['body']['value'],
    'info' => $edit['info'],
    'format' => $edit['body']['format'],
  ))->condition('bid', $delta)->execute();
  return TRUE;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.