You are here

protected function context_respect_layouts_reaction_block::is_enabled_region in Context Respect 6

Same name and namespace in other branches
  1. 7 plugins/context_respect_layouts_reaction_block.inc \context_respect_layouts_reaction_block::is_enabled_region()

Override of is_enabled_region(). Check that there is an active layout and it supports the given region.

File

plugins/context_respect_layouts_reaction_block.inc, line 14
Context Respect layouts plugin file.

Class

context_respect_layouts_reaction_block
@file Context Respect layouts plugin file.

Code

protected function is_enabled_region($region) {
  $layout = $this
    ->get_active_layout();
  if ($layout && isset($layout['regions']) && is_array($layout['regions'])) {
    return in_array($region, $layout['regions'], TRUE) && parent::is_enabled_region($region);
  }
  return parent::is_enabled_region($region);
}