function NodeHooks1::entityExtraFieldInfo

Implements hook_entity_extra_field_info().

Attributes

#[Hook('entity_extra_field_info')]

File

core/modules/node/src/Hook/NodeHooks1.php, line 178

Class

NodeHooks1
Hook implementations for node.

Namespace

Drupal\node\Hook

Code

public function entityExtraFieldInfo() : array {
  $extra = [];
  $description = $this->t('Node module element');
  foreach (NodeType::loadMultiple() as $bundle) {
    $extra['node'][$bundle->id()]['display']['links'] = [
      'label' => $this->t('Links'),
      'description' => $description,
      'weight' => 100,
      'visible' => TRUE,
    ];
  }
  return $extra;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.