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

Breadcrumb

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

function Node::buildOptionsForm

Provide link to node option.

Overrides FieldPluginBase::buildOptionsForm

2 calls to Node::buildOptionsForm()
HistoryUserTimestamp::buildOptionsForm in core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
Provide link to node option.
HistoryUserTimestamp::buildOptionsForm in core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
Provide link to node option.
1 method overrides Node::buildOptionsForm()
HistoryUserTimestamp::buildOptionsForm in core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
Provide link to node option.

File

core/modules/node/src/Plugin/views/field/Node.php, line 49

Class

Node
Field handler to provide simple renderer that allows linking to a node.

Namespace

Drupal\node\Plugin\views\field

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    $form['link_to_node'] = [
        '#title' => $this->t('Link this field to the original piece of content'),
        '#description' => $this->t("Enable to override this field's links."),
        '#type' => 'checkbox',
        '#default_value' => !empty($this->options['link_to_node']),
    ];
    parent::buildOptionsForm($form, $form_state);
}

API Navigation

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