function InlineBlock::buildConfigurationForm
Creates a generic configuration form for all block types. Individual block plugins can add elements to this form by overriding BlockBase::blockForm(). Most block plugins should not override this method unless they need to alter the generic form elements.
Overrides BlockPluginTrait::buildConfigurationForm
File
- 
              core/modules/ layout_builder/ src/ Plugin/ Block/ InlineBlock.php, line 257 
Class
- InlineBlock
- Defines an inline block plugin type.
Namespace
Drupal\layout_builder\Plugin\BlockCode
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.
