Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MachineName.php

function MachineName::buildOptionsForm

Overrides FieldPluginBase::buildOptionsForm

File

core/modules/views/src/Plugin/views/field/MachineName.php, line 58

Class

MachineName
Field handler which allows to show machine name content as human name.

Namespace

Drupal\views\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);
    $form['machine_name'] = [
        '#title' => $this->t('Output machine name'),
        '#description' => $this->t('Display field as machine name.'),
        '#type' => 'checkbox',
        '#default_value' => !empty($this->options['machine_name']),
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal