You are here

public function PdfFieldHandler::options_form in Commerce Invoice 7.2

Overrides parent::options_form().

File

modules/pdf/src/Views/PdfFieldHandler.php, line 30
Views field handler to display a download link for an invoice PDF.

Class

PdfFieldHandler
@file Views field handler to display a download link for an invoice PDF.

Namespace

Drupal\commerce_invoice_pdf\Views

Code

public function options_form(&$form, &$form_state) {
  $form['op'] = array(
    '#type' => 'select',
    '#title' => t('Link type'),
    '#default_value' => $this->options['op'],
    '#options' => array(
      'view' => t('View (open PDF in browser)'),
      'download' => t('Force download'),
    ),
  );
  $form['text'] = array(
    '#type' => 'textfield',
    '#title' => t('Text to display'),
    '#default_value' => $this->options['text'],
  );
  parent::options_form($form, $form_state);
}