You are here

public function SiteBannerContextReactionChangeBannerStatus::execute in Site Banner 7

Output banner background colour for active contexts.

File

./site_banner_context_reaction_functions.inc, line 42

Class

SiteBannerContextReactionChangeBannerStatus
Handle enabling/disabling the site banner and debug mode.

Code

public function execute(&$site_banner_status, &$site_banner_debug_status) {
  $contexts = context_active_contexts();
  foreach ($contexts as $context) {
    if (!empty($context->reactions['change_banner_status'])) {
      $site_banner_status |= site_banner_get_site_banner_status($context);
      $site_banner_debug_status |= site_banner_get_site_banner_debug_status($context);
    }
  }
}