function RulesPluginUI::form_extract_values

Applies the values of the form to the element.

3 calls to RulesPluginUI::form_extract_values()
RulesAbstractPluginUI::form_extract_values in ui/ui.core.inc
RulesContainerPluginUI::form_extract_values in ui/ui.core.inc
Applies the values of the form to the given rule configuration.
RulesPluginUI::form_validate in ui/ui.core.inc
Implements RulesPluginUIInterface.
2 methods override RulesPluginUI::form_extract_values()
RulesAbstractPluginUI::form_extract_values in ui/ui.core.inc
RulesContainerPluginUI::form_extract_values in ui/ui.core.inc
Applies the values of the form to the given rule configuration.

File

ui/ui.core.inc, line 387

Class

RulesPluginUI
Faces UI extender for all kind of Rules plugins.

Code

public function form_extract_values($form, &$form_state) {
    $this->element->settings = array();
    $form_values = RulesPluginUI::getFormStateValues($form, $form_state);
    if (isset($form_values['parameter'])) {
        foreach ($form_values['parameter'] as $name => $values) {
            $this->element->settings += $values['settings'];
        }
    }
    if (isset($form_values['provides'])) {
        foreach ($form_values['provides'] as $name => $values) {
            $this->element->settings[$name . ':label'] = $values['label'];
            $this->element->settings[$name . ':var'] = $values['var'];
        }
    }
    if (!empty($form['settings'])) {
        $this->settingsFormExtractValues($form, $form_state);
    }
}