protected function context_reaction_block::system_region_list in Context 7.3
Provide caching for system_region_list since it can get called frequently. Evaluate for removal once https://drupal.org/node/1873450 lands or system_region_list is otherwise cached in core
6 calls to context_reaction_block::system_region_list()
- context_reaction_block::block_list in plugins/
context_reaction_block.inc - An alternative version of block_list() that provides any context enabled blocks.
- context_reaction_block::editable_region in plugins/
context_reaction_block.inc - Add markup for making a region editable.
- context_reaction_block::execute in plugins/
context_reaction_block.inc - Execute.
- context_reaction_block::is_editable_region in plugins/
context_reaction_block.inc - Determine whether inline editing requirements are met and that the current user may edit.
- context_reaction_block::is_enabled_region in plugins/
context_reaction_block.inc - Return a list of enabled regions for which blocks should be built. Split out into a separate method for easy overrides in extending classes.
File
- plugins/
context_reaction_block.inc, line 658
Class
- context_reaction_block
- Expose blocks as context reactions.
Code
protected function system_region_list($theme_key, $show = REGIONS_ALL) {
static $cache = array();
if (!isset($cache[$theme_key])) {
$cache[$theme_key] = array();
}
if (!isset($cache[$theme_key][$show])) {
$cache[$theme_key][$show] = system_region_list($theme_key, $show);
}
return $cache[$theme_key][$show];
}