Skip to main content
3 of 3
removed tags from the title
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

How do I programmatically remove a block?

I have a custom module that is intended to be deployed as a pure web view, with no styling whatsoever beyond what I created in the .twig file.

I installed the Stark theme and in my local instance I went to Admin > Structure > Block layout to manually remove all the active blocks.

However, this module will be deployed and I will have to have it programmatically remove all blocks when integrated into the mobile client.

Is there a way to turn off any automatic/default activation of blocks?

oaklandj
  • 141
  • 1
  • 3