You are here

public function Type::buildOptionsForm in Views (for Drupal 7) 8.3

Provide machine_name option for to node type display.

Overrides Node::buildOptionsForm

File

lib/Views/node/Plugin/views/field/Type.php, line 35
Definition of Views\node\Plugin\views\field\Type.

Class

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

Namespace

Views\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']),
  );
}