function views_attach_plugin_display_profile::options_submit in Views attach 7.2
Same name and namespace in other branches
- 6.2 views_attach_plugin_display_profile.inc \views_attach_plugin_display_profile::options_submit()
- 6 views_attach_plugin_display_profile.inc \views_attach_plugin_display_profile::options_submit()
Perform any necessary changes to the form values prior to storage.
There is no need for this function to actually store the data.
Overrides views_plugin_display::options_submit
File
- ./
views_attach_plugin_display_profile.inc, line 136
Class
- views_attach_plugin_display_profile
- The plugin that handles a user profile.
Code
function options_submit($form, &$form_state) {
// It is very important to call the parent function here:
parent::options_submit($form, $form_state);
switch ($form_state['section']) {
case 'weight':
$this
->set_option('weight', $form_state['values']['weight']);
break;
case 'category':
$this
->set_option('category', $form_state['values']['category']);
break;
case 'arguments':
$this
->set_option('argument_mode', $form_state['values']['argument_mode']);
if ($form_state['values']['argument_mode'] == 'token') {
$this
->set_option('default_argument', $form_state['values']['default_argument']);
}
else {
$this
->set_option('default_argument', NULL);
}
break;
}
}