1 block.class.inc | Block::getRequiredContexts() |
Get a list of all required context plugin names for this block.
Return value
array: An unindexed array of context plugin names.
File
- core/
modules/ layout/ includes/ block.class.inc, line 367 - A class that wraps around a block to store settings information.
Class
- Block
- @file A class that wraps around a block to store settings information.
Code
function getRequiredContexts() {
$required_contexts = array();
$block_info = $this->getBlockInfo();
if (!empty($block_info['required contexts'])) {
$required_contexts = $block_info['required contexts'];
}
return $required_contexts;
}