public function Type::buildOptionsForm

Provide machine_name option for to node type display.

Overrides Node::buildOptionsForm

File

drupal/core/modules/node/lib/Drupal/node/Plugin/views/field/Type.php, line 32
Definition of Drupal\node\Plugin\views\field\Type.

Class

Type
Field handler to translate a node type into its readable form.

Namespace

Drupal\node\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 the content type machine name.'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['machine_name']),
  );
}