You are here

protected function RulesPlugin::importParameterSetting in Rules 7.2

1 call to RulesPlugin::importParameterSetting()
RulesPlugin::importSettings in includes/rules.core.inc

File

includes/rules.core.inc, line 1355
Rules base classes and interfaces needed for any rule evaluation.

Class

RulesPlugin
Base class for rules plugins.

Code

protected function importParameterSetting($name, $export) {
  if (is_array($export) && isset($export['select'])) {
    $this->settings[$name . ':select'] = $export['select'];
    if (count($export) > 1) {

      // Add in processor settings.
      unset($export['select']);
      $this->settings[$name . ':process'] = $export;
    }
  }
  elseif (is_array($export) && count($export) == 1 && isset($export[0])) {
    $this->settings[$name . ':select'] = $export[0];
  }
  elseif (is_array($export) && isset($export['value'])) {
    $this->settings[$name] = $export['value'];
  }
  else {
    $this->settings[$name] = $export;
  }
}