public function MachineName::buildOptionsForm

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

Overrides FieldPluginBase::buildOptionsForm

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/field/MachineName.php, line 56
Definition of Drupal\views\Plugin\views\field\MachineName.

Class

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

Namespace

Drupal\views\Plugin\views\field

Code

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