Thanks to help from David Radcliffe, I have a workable solution.
In the layout.layout.default.json config file there are two important pieces of information that need to be changed to remove a block.
1) I need to remove the block from the header region = config_set
2) I need to remove the details/description of the block = config_clear
config_set('layout.layout.default','positions.header', array('84c43df4-1165-4faf-8700-c362a7153c0b'));
config_clear('layout.layout.default','content.df51ab0e-b635-4a17-a308-8dd5b2ea51e1');
My config set includes the UUID for the block I want to keep. In config_clear I specify the details of the block I am removing.
NOTE: I can hard code the UUID for the blocks, because they are hard-coded into the layout by default on installation. Blocks that have been added through the UI will have random UUIDs (I believe) and this method will not work.
Thanks to help from David Radcliffe, I have a workable solution.
In the layout.layout.default.json config file there are two important pieces of information that need to be changed to remove a block.
1) I need to remove the block from the header region = config_set
2) I need to remove the details/description of the block = config_clear
My config set includes the UUID for the block I want to keep. In config_clear I specify the details of the block I am removing.
NOTE: I can hard code the UUID for the blocks, because they are hard-coded into the layout by default on installation. Blocks that have been added through the UI will have random UUIDs (I believe) and this method will not work.