You are here

public function views_data_export_pdf_plugin_style_export::options_form in Views Data Export PDF 7

Same name and namespace in other branches
  1. 7.2 plugins/views_data_export_pdf_plugin_style_export.inc \views_data_export_pdf_plugin_style_export::options_form()

Options form mini callback.

Parameters

$form: Form array to add additional fields to.

$form_state: State of the form.

File

plugins/views_data_export_pdf_plugin_style_export.inc, line 69
PDF style plugin.

Class

views_data_export_pdf_plugin_style_export
@file PDF style plugin.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['pdf_renderer'] = $this
    ->build_renderer_selector();
  $form['developer_mode'] = [
    '#type' => 'checkbox',
    '#title' => t('Bypass PDF rendering and export intermediate HTML instead (for development and styling purposes)'),
    '#default_value' => $this->options['developer_mode'],
    '#description' => t('Enable this option to use the HTML markup that is normally fed into "WK HTML to PDF" as the export output, bypassing the conversion to PDF. This can be useful when crafting a user stylesheet.'),
  ];
  $form['each_group_separate_table'] = [
    '#type' => 'checkbox',
    '#title' => t('Each group as separate table'),
    '#default_value' => $this->options['each_group_separate_table'],
    '#description' => t('If used grouping, this option provide rendering each group as separate table.'),
  ];
  $form['landscape'] = [
    '#type' => 'checkbox',
    '#title' => t('Landscape'),
    '#default_value' => $this->options['landscape'],
    '#description' => t('PDF Landscape format.'),
  ];
  $form['page_width'] = [
    '#type' => 'textfield',
    '#title' => t('Page width'),
    '#default_value' => $this->options['page_width'],
    '#description' => t('Page width in mm, prior to rotation for portrait/landscape orientation. If blank, defaults to 210 mm (A4).'),
  ];
  $form['page_height'] = [
    '#type' => 'textfield',
    '#title' => t('Page height'),
    '#default_value' => $this->options['page_height'],
    '#description' => t('Page height in mm, prior to rotation for portrait/landscape orientation. If blank, defaults to 297 mm (A4).'),
  ];
  $form['user_style_sheet'] = [
    '#type' => 'textfield',
    '#title' => t('Custom stylesheet path'),
    '#default_value' => $this->options['user_style_sheet'],
    '#description' => t('Override the default stylesheet with a custom, site-specific stylesheet. Path is relative to site base path. For example: <code>sites/default/files/pdf_style.css</code>'),
  ];
}