function RulesDataProcessor::attachForm

Attaches the form of applicable data processors.

1 call to RulesDataProcessor::attachForm()
RulesDataUI::selectionForm in ui/ui.data.inc
Provides the selection form for a parameter.
1 method overrides RulesDataProcessor::attachForm()
RulesDataInputEvaluator::attachForm in includes/rules.processor.inc
Overrides RulesDataProcessor::attachForm().

File

includes/rules.processor.inc, line 81

Class

RulesDataProcessor
Common base class for Rules data processors.

Code

public static function attachForm(&$form, $settings, $param_info, $var_info, $access_check = TRUE) {
    // If $settings is already prepared get the settings from the processors.
    if ($settings instanceof RulesDataProcessor) {
        $settings = $settings->getChainSettings();
    }
    foreach (self::processors($param_info, $access_check) as $name => $info) {
        $settings += array(
            $name => array(),
        );
        $form[$name] = call_user_func(array(
            $info['class'],
            'form',
        ), $settings[$name], $var_info);
        $form[$name]['#weight'] = $info['weight'];
    }
}