You are here

public function VariableRealmUnionController::variableRealmSwitch in Variable 7.2

Implementation of VariableRealmHooks::variableRealmSwitch()

Overrides VariableRealmHooks::variableRealmSwitch

File

variable_realm/variable_realm_union.class.inc, line 117
Classes for Realm Union.

Class

VariableRealmUnionController
Default Realm Union class

Code

public function variableRealmSwitch($realm_name, $realm_key) {

  // If the this realm is active, try to find new key.
  if ($this
    ->isActive() && $this
    ->isUnionRealm($realm_name) && ($union_key = $this
    ->getRequestKey())) {
    $this
      ->setKey($union_key);
  }
}