block_custom_block_delete_submit() contains code that should be moved to a dedicated API function.

Comments

Anonymous’s picture

Version: 7.x-dev » 8.x-dev

It makes sense that this should move to an API function. This will probably change drastically in 8.x, but we can use the patch for 8.x to make this change in 7.x.

rszrama’s picture

Title: block_custom_block_delete_submit() contains API functionality » Move custom block deletion code from block_custom_block_delete_submit() to an API function
Version: 8.x-dev » 7.x-dev
Category: bug » task

Demoting this back to D7, as it has indeed changed drastically in D8. Custom blocks are entities now and are deleted in the submit handler using <$php $block->delete(); ?>. Recategorizing, as this isn't really a bug in any code, just an opportunity to improve an API by not tucking business logic away in a submit handler.