You are here

public function FullName::buildOptionsForm in Ubercart 8.4

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

Overrides FieldPluginBase::buildOptionsForm

File

uc_order/src/Plugin/views/field/FullName.php, line 43

Class

FullName
Field handler to provide full names.

Namespace

Drupal\uc_order\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['link_to_user'] = [
    '#title' => $this
      ->t('Link this field to its user'),
    '#description' => $this
      ->t("Enable to override this field's links."),
    '#type' => 'checkbox',
    '#default_value' => $this->options['link_to_user'],
  ];
  $form['format'] = [
    '#type' => 'select',
    '#title' => $this
      ->t('Format'),
    '#options' => [
      'first_last' => $this
        ->t('First Last'),
      'last_c_first' => $this
        ->t('Last, First'),
      'last_first' => $this
        ->t('Last First'),
    ],
    '#default_value' => $this->options['format'],
  ];
}