function LayoutBuilderTestHooks::entityExtraFieldInfo

Implements hook_entity_extra_field_info().

File

core/modules/layout_builder/tests/modules/layout_builder_test/src/Hook/LayoutBuilderTestHooks.php, line 47

Class

LayoutBuilderTestHooks
Hook implementations for layout_builder_test.

Namespace

Drupal\layout_builder_test\Hook

Code

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

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