function RulesReactionRule::importChildren

File

includes/rules.plugins.inc, line 543

Class

RulesReactionRule
Represents rules getting triggered by events.

Code

protected function importChildren($export, $key = 'ON') {
  // Detect and support old-style exports: a numerically indexed array of
  // event names.
  if (isset($export[$key])) {
    if (is_string(reset($export[$key])) && is_numeric(key($export[$key]))) {
      $this->events = $export[$key];
    }
    else {
      $this->events = array_keys($export[$key]);
      $this->eventSettings = array_filter($export[$key]);
    }
  }
  parent::importChildren($export);
}