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;
}