You are here

function PageBreak::options_form in Views PDF 8

Option form.

File

src/Plugin/views/style/PageBreak.php, line 46
Contains \Drupal\views_pdf\Plugin\views\style\PageBreak.

Class

PageBreak
Class that holds the functionality for the page break in a PDF display.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['last_row'] = array(
    '#type' => 'checkbox',
    '#title' => t('Exclude from last row'),
    '#default_value' => $this->options['last_row'],
    '#description' => t('Check this box to not add new page on last row.'),
  );
  $form['every_nth'] = array(
    '#type' => 'textfield',
    '#title' => t('Insert break after how many rows?'),
    '#size' => 10,
    '#default_value' => $this->options['every_nth'],
    '#element_validate' => array(
      'element_validate_integer_positive',
    ),
    '#description' => t('Enter a value greater than 1 if you want to have multiple rows on one page'),
  );
}