alberto56
alberto56

Reputation: 3172

How can my module inform the drupal Block module that a block no longer exists?

My module defines a variable number of blocks, which are then made available to the "block" module for display is specific regions.

When my module deletes a block, drupal still thinks it exists. How can I tell drupal that a block should be discarded? I'm looking for something like block_delete($module, $delta), but that does not exist.

Cheers,

Albert.

Upvotes: 0

Views: 310

Answers (1)

mirzu
mirzu

Reputation: 1831

You can search the block table for any references for your block and remove them from the table in the submit function of the form you are using to delete the block. I don't think there is a cleaner way to insure that the block is removed. You might review how menu_block handles this (if it doesn't).

Upvotes: 1

Related Questions