function views_attach_plugin_display_node_content::options_submit in Views attach 7.2
Same name and namespace in other branches
- 6.2 views_attach_plugin_display_node_content.inc \views_attach_plugin_display_node_content::options_submit()
- 6 views_attach_plugin_display_node_content.inc \views_attach_plugin_display_node_content::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_node_content.inc, line 165
Class
- views_attach_plugin_display_node_content
- The plugin that handles node-attached views.
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 'types':
$this
->set_option('types', array_filter($form_state['values']['types']));
break;
case 'modes':
$this
->set_option('modes', array_values(array_filter($form_state['values']['modes'])));
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;
case 'show_title':
$this
->set_option('show_title', $form_state['values']['show_title']);
break;
}
}