You are here

public function HistoryUserTimestamp::buildOptionsForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php \Drupal\history\Plugin\views\field\HistoryUserTimestamp::buildOptionsForm()

Provide link to node option

Overrides Node::buildOptionsForm

File

core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php, line 59

Class

HistoryUserTimestamp
Field handler to display the marker for new content.

Namespace

Drupal\history\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  if (\Drupal::moduleHandler()
    ->moduleExists('comment')) {
    $form['comments'] = [
      '#type' => 'checkbox',
      '#title' => $this
        ->t('Check for new comments as well'),
      '#default_value' => !empty($this->options['comments']),
    ];
  }
}