You are here

public function TimeInterval::buildOptionsForm in Views (for Drupal 7) 8.3

Default options form that provides the label widget that all fields should have.

Overrides FieldPluginBase::buildOptionsForm

File

lib/Drupal/views/Plugin/views/field/TimeInterval.php, line 31
Definition of Drupal\views\Plugin\views\field\TimeInterval.

Class

TimeInterval
A handler to provide proper displays for time intervals.

Namespace

Drupal\views\Plugin\views\field

Code

public function buildOptionsForm(&$form, &$form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['granularity'] = array(
    '#type' => 'textfield',
    '#title' => t('Granularity'),
    '#description' => t('How many different units to display in the string.'),
    '#default_value' => $this->options['granularity'],
  );
}