function views_pdf_plugin_display::options_submit in Views PDF 7
Same name and namespace in other branches
- 6 views_pdf_plugin_display.inc \views_pdf_plugin_display::options_submit()
- 7.3 views_pdf_plugin_display.inc \views_pdf_plugin_display::options_submit()
- 7.2 plugins/views_pdf_plugin_display.inc \views_pdf_plugin_display::options_submit()
Handles the storage of the options.
Overrides views_plugin_display_page::options_submit
File
- ./
views_pdf_plugin_display.inc, line 492 - PDF display plugin.
Class
- views_pdf_plugin_display
- This class contains all the functionality of the PDF display.
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 'pdf_page':
$this
->set_option('default_page_format', $form_state['values']['default_page_format']);
$this
->set_option('default_page_format_custom', $form_state['values']['default_page_format_custom']);
$this
->set_option('default_page_orientation', $form_state['values']['default_page_orientation']);
$this
->set_option('unit', $form_state['values']['unit']);
$this
->set_option('margin_left', $form_state['values']['margin_left']);
$this
->set_option('margin_right', $form_state['values']['margin_right']);
$this
->set_option('margin_top', $form_state['values']['margin_top']);
$this
->set_option('margin_bottom', $form_state['values']['margin_bottom']);
break;
case 'pdf_fonts':
$this
->set_option('default_font_size', $form_state['values']['default_font_size']);
$this
->set_option('default_font_style', $form_state['values']['default_font_style']);
$this
->set_option('default_font_family', $form_state['values']['default_font_family']);
$this
->set_option('default_text_align', $form_state['values']['default_text_align']);
$this
->set_option('default_font_color', $form_state['values']['default_font_color']);
break;
case 'pdf_template':
$this
->set_option('leading_template', $form_state['values']['leading_template']);
$this
->set_option('template', $form_state['values']['template']);
$this
->set_option('succeed_template', $form_state['values']['succeed_template']);
break;
case 'displays':
$this
->set_option($form_state['section'], $form_state['values'][$form_state['section']]);
break;
case 'css':
$this
->set_option('css_file', $form_state['values']['css_file']);
break;
}
}