You are here

public function Counter::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/Counter.php, line 29
Definition of Drupal\views\Plugin\views\field\Counter.

Class

Counter
Field handler to show a counter of the current row.

Namespace

Drupal\views\Plugin\views\field

Code

public function buildOptionsForm(&$form, &$form_state) {
  $form['counter_start'] = array(
    '#type' => 'textfield',
    '#title' => t('Starting value'),
    '#default_value' => $this->options['counter_start'],
    '#description' => t('Specify the number the counter should start at.'),
    '#size' => 2,
  );
  parent::buildOptionsForm($form, $form_state);
}