You are here

public function ItemCount::buildOptionsForm in Translation Management Tool 8

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

Overrides FieldPluginBase::buildOptionsForm

File

translators/tmgmt_local/src/Plugin/views/field/ItemCount.php, line 36

Class

ItemCount
Field handler to show the amount of job items per task.

Namespace

Drupal\tmgmt_local\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $options = array(
    '' => t('- All -'),
  );
  $options += JobItem::getStates();
  $form['state'] = array(
    '#title' => t('Job item state'),
    '#description' => t('Count only job items of a certain state.'),
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $this->options['state'],
  );
}