function RulesPlugin::processSettings

Processes the settings e.g. to prepare input evaluators.

Usually settings get processed automatically, however if $this->settings has been altered manually after element construction, it needs to be invoked explicitly with $force set to TRUE.

6 calls to RulesPlugin::processSettings()
RulesAbstractPlugin::processSettings in includes/rules.core.inc
Processes the settings e.g. to prepare input evaluators.
RulesContainerPlugin::executeByArgs in includes/rules.core.inc
Executes container with the given arguments.
RulesPlugin::access in includes/rules.core.inc
Whether the currently logged in user has access to all configured elements.
RulesPlugin::dependencies in includes/rules.core.inc
Calculates an array of required modules.
RulesPlugin::integrityCheck in includes/rules.core.inc
Makes sure the plugin is configured right.

... See full list

1 method overrides RulesPlugin::processSettings()
RulesAbstractPlugin::processSettings in includes/rules.core.inc
Processes the settings e.g. to prepare input evaluators.

File

includes/rules.core.inc, line 848

Class

RulesPlugin
Base class for rules plugins.

Code

public function processSettings($force = FALSE) {
    // Process if not done yet.
    if ($force || !empty($this->settings['#_needs_processing'])) {
        $var_info = $this->availableVariables();
        foreach ($this->pluginParameterInfo() as $name => $info) {
            // Prepare input evaluators.
            if (isset($this->settings[$name])) {
                $this->settings[$name . ':process'] = $this->settings[$name];
                RulesDataInputEvaluator::prepareSetting($this->settings[$name . ':process'], $info, $var_info);
            }
            elseif (isset($this->settings[$name . ':select']) && !empty($this->settings[$name . ':process'])) {
                RulesDataProcessor::prepareSetting($this->settings[$name . ':process'], $info, $var_info);
            }
            // Clean up.
            if (empty($this->settings[$name . ':process'])) {
                unset($this->settings[$name . ':process']);
            }
        }
        unset($this->settings['#_needs_processing']);
    }
}