function Counter::buildOptionsForm
Same name in other branches
- 9 core/modules/views/src/Plugin/views/field/Counter.php \Drupal\views\Plugin\views\field\Counter::buildOptionsForm()
- 10 core/modules/views/src/Plugin/views/field/Counter.php \Drupal\views\Plugin\views\field\Counter::buildOptionsForm()
- 11.x core/modules/views/src/Plugin/views/field/Counter.php \Drupal\views\Plugin\views\field\Counter::buildOptionsForm()
Overrides FieldPluginBase::buildOptionsForm
File
-
core/
modules/ views/ src/ Plugin/ views/ field/ Counter.php, line 38
Class
- Counter
- Field handler to show a counter of the current row.
Namespace
Drupal\views\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
$form['counter_start'] = [
'#type' => 'textfield',
'#title' => $this->t('Starting value'),
'#default_value' => $this->options['counter_start'],
'#description' => $this->t('Specify the number the counter should start at.'),
'#size' => 2,
];
parent::buildOptionsForm($form, $form_state);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.