You are here

function supersized_context_reaction::execute in Supersized 7

Same name and namespace in other branches
  1. 8 supersized_context/supersized_context_reaction.inc \supersized_context_reaction::execute()

See if context contains redirect reaction.

File

supersized_context/supersized_context_reaction.inc, line 33
Reaction class of supersized.

Class

supersized_context_reaction
@file Reaction class of supersized.

Code

function execute() {
  $contexts = context_active_contexts();
  foreach ($contexts as $context) {
    if (!empty($context->reactions[$this->plugin])) {
      preg_match('/\\[nid: (\\d+)\\]$/', $context->reactions[$this->plugin]['nid'], $matches);
      $nid = $matches[1];
      return $nid;
    }
  }
}