public function MigrateDestinationCustomBlock::saveCustomBlock in Migrate 7.2
1 call to MigrateDestinationCustomBlock::saveCustomBlock()
- MigrateDestinationCustomBlock::import in plugins/
destinations/ block_custom.inc - Import a single row.
File
- plugins/
destinations/ block_custom.inc, line 219 - Support for custom block destinations.
Class
- MigrateDestinationCustomBlock
- Destination class implementing migration into {block_custom}.
Code
public function saveCustomBlock($block) {
drupal_alter('block_custom', $block);
if (!empty($block['bid'])) {
drupal_write_record('block_custom', $block, array(
'bid',
));
module_invoke_all('block_custom_update', $block);
}
else {
drupal_write_record('block_custom', $block);
module_invoke_all('block_custom_insert', $block);
}
return $block['bid'];
}