function InlineBlock::buildConfigurationForm

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

Overrides BlockBase::buildConfigurationForm

File

core/modules/layout_builder/src/Plugin/Block/InlineBlock.php, line 253

Class

InlineBlock
Defines an inline block plugin type.

Namespace

Drupal\layout_builder\Plugin\Block

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $form = parent::buildConfigurationForm($form, $form_state);
    if ($this->isNew) {
        // If the Content Block is new then don't provide a default label.
        unset($form['label']['#default_value']);
    }
    $form['label']['#description'] = $this->t('The title of the block as shown to the user.');
    return $form;
}

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