You are here

public function TypeStyle::buildOptionsForm in Type Style 8

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

Overrides FieldPluginBase::buildOptionsForm

File

src/Plugin/views/field/TypeStyle.php, line 60

Class

TypeStyle
A handler to output and arbitrary type style.

Namespace

Drupal\type_style\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  if ($this->realField === 'type_style') {
    $form['type_style_name'] = [
      '#type' => 'textfield',
      '#title' => $this
        ->t('Type Style name'),
      '#description' => $this
        ->t('The Type Style name, i.e. "color" or "icon".'),
      '#default_value' => $this->options['type_style_name'],
    ];
  }
}