function views_handler_argument::options_submit

Same name in other branches
  1. 7.x-3.x handlers/views_handler_argument.inc \views_handler_argument::options_submit()

Overrides views_handler::options_submit

File

handlers/views_handler_argument.inc, line 278

Class

views_handler_argument
Base class for arguments.

Code

function options_submit($form, &$form_state) {
    if (empty($form_state['values']['options'])) {
        return;
    }
    // Let the plugins make submit modifications if necessary.
    $default_id = $form_state['values']['options']['default_argument_type'];
    $plugin = $this->get_plugin('argument default', $default_id);
    if ($plugin) {
        $options =& $form_state['values']['options']['argument_default'][$default_id];
        $plugin->options_submit($form['argument_default'][$default_id], $form_state, $options);
        // Copy the now submitted options to their final resting place so they get saved.
        $form_state['values']['options']['default_argument_options'] = $options;
    }
    $validate_id = $form_state['values']['options']['validate_type'];
    $plugin = $this->get_plugin('argument validator', $validate_id);
    if ($plugin) {
        $options =& $form_state['values']['options']['argument_validate'][$validate_id];
        $plugin->options_submit($form['argument_validate'][$validate_id], $form_state, $options);
        // Copy the now submitted options to their final resting place so they get saved.
        $form_state['values']['options']['validate_options'] = $options;
    }
}