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

Breadcrumb

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

function Node::init

Overrides FieldPluginBase::init

2 calls to Node::init()
HistoryUserTimestamp::init in core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
Initialize the plugin.
HistoryUserTimestamp::init in core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
Initialize the plugin.
1 method overrides Node::init()
HistoryUserTimestamp::init in core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php
Initialize the plugin.

File

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

Class

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

Namespace

Drupal\node\Plugin\views\field

Code

public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$options = NULL) {
    parent::init($view, $display, $options);
    // Don't add the additional fields to groupby
    if (!empty($this->options['link_to_node'])) {
        $this->additional_fields['nid'] = [
            'table' => 'node_field_data',
            'field' => 'nid',
        ];
    }
}

API Navigation

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