function views_pdf_plugin_display::options_submit in Views PDF 7.3
Same name and namespace in other branches
- 6 views_pdf_plugin_display.inc \views_pdf_plugin_display::options_submit()
- 7 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 664 - 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_header':
$this
->set_option('header_margin', $form_state['values']['header_margin']);
$this
->set_option('header_font_size', $form_state['values']['header_font_size']);
$this
->set_option('header_font_style', $form_state['values']['header_font_style']);
$this
->set_option('header_font_family', $form_state['values']['header_font_family']);
$this
->set_option('header_text_align', $form_state['values']['header_text_align']);
$this
->set_option('header_font_color', $form_state['values']['header_font_color']);
$this
->set_option('footer_spacing', $form_state['values']['footer_spacing']);
$this
->set_option('footer_font_size', $form_state['values']['footer_font_size']);
$this
->set_option('footer_font_style', $form_state['values']['footer_font_style']);
$this
->set_option('footer_font_family', $form_state['values']['footer_font_family']);
$this
->set_option('footer_text_align', $form_state['values']['footer_text_align']);
$this
->set_option('footer_font_color', $form_state['values']['footer_font_color']);
break;
case 'pdf_template':
$this
->set_option('leading_template', $form_state['values']['leading_template']);
$this
->set_option('leading_header', $form_state['values']['leading_header']);
$this
->set_option('leading_footer', $form_state['values']['leading_footer']);
$this
->set_option('template', $form_state['values']['template']);
$this
->set_option('succeed_template', $form_state['values']['succeed_template']);
$this
->set_option('succeed_header', $form_state['values']['succeed_header']);
$this
->set_option('succeed_footer', $form_state['values']['succeed_footer']);
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;
}
}