function LayoutBuilderTestEntityHooks::entityExtraFieldInfo

Same name and namespace in other branches
  1. 11.x core/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestEntityHooks.php \Drupal\layout_builder_test\Hook\LayoutBuilderTestEntityHooks::entityExtraFieldInfo()

Implements hook_entity_extra_field_info().

Attributes

#[Hook('entity_extra_field_info')]

File

core/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestEntityHooks.php, line 61

Class

LayoutBuilderTestEntityHooks
Entity hook implementations for layout_builder_test.

Namespace

Drupal\layout_builder_test\Hook

Code

public function entityExtraFieldInfo() : array {
  $extra['node']['bundle_with_section_field']['display']['layout_builder_test'] = [
    'label' => 'Extra label',
    'description' => 'Extra description',
    'weight' => 0,
  ];
  $extra['node']['bundle_with_section_field']['display']['layout_builder_test_2'] = [
    'label' => 'Extra Field 2',
    'description' => 'Extra Field 2 description',
    'weight' => 0,
    'visible' => FALSE,
  ];
  $extra['node']['bundle_with_section_field']['display']['layout_builder_test_empty'] = [
    'label' => 'Extra Field (empty)',
    'description' => 'Extra Field (empty) description',
    'weight' => 0,
  ];
  return $extra;
}

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