function FieldBlock::defaultConfiguration

Same name in other branches
  1. 8.9.x core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::defaultConfiguration()
  2. 10 core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::defaultConfiguration()
  3. 11.x core/modules/layout_builder/src/Plugin/Block/FieldBlock.php \Drupal\layout_builder\Plugin\Block\FieldBlock::defaultConfiguration()

Overrides BlockPluginTrait::defaultConfiguration

File

core/modules/layout_builder/src/Plugin/Block/FieldBlock.php, line 223

Class

FieldBlock
Provides a block that renders a field from an entity.

Namespace

Drupal\layout_builder\Plugin\Block

Code

public function defaultConfiguration() {
    return [
        'label_display' => FALSE,
        'formatter' => [
            'label' => 'above',
            'type' => $this->pluginDefinition['default_formatter'],
            'settings' => [],
            'third_party_settings' => [],
        ],
    ];
}

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