I need to create an array in my custom module that contains data from multiple blocks. something like this:
array(
'block_1' => array(
'subject'=>'Block Subject Here',
'body'=>'Full block body html here',
),
'custom_module_block' => array(
'subject'=>'Block Subject Here',
'body'=>'Full block body html here',
),
'another_block_machinename' => array(
'subject'=>'Block Subject Here',
'body'=>'Full block body html here',
),
);
In order to do this, i need to be able to programmatically load block content, being able to access and handle each block's subject and body in order to populate my array.
Imagine the node equivalent being a simple node_load(); where you can easily access $node->title and $node->body from within the loaded node.
I'm not able to find any functions that make loading this block data possible. Neither block_load() nor module_invoke() get me all the data I need (specifically the block subject).
So, how do I load a block's subject and body programmatically so I can use it in my custom module?