You are here

public function TranslationCountField::buildOptionsForm in Translation Views 8

Provide option to include original language in count.

Overrides NumericField::buildOptionsForm

File

src/Plugin/views/field/TranslationCountField.php, line 73

Class

TranslationCountField
Show translation count.

Namespace

Drupal\translation_views\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  $form['include_original_language'] = [
    '#title' => $this
      ->t('Include original language in count'),
    '#description' => $this
      ->t("Enable to also count the original language."),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['include_original_language']),
  ];
  parent::buildOptionsForm($form, $form_state);
}