function BlockBase::buildConfigurationForm

Same name in other branches
  1. 10 core/lib/Drupal/Core/Block/BlockBase.php \Drupal\Core\Block\BlockBase::buildConfigurationForm()
  2. 11.x core/lib/Drupal/Core/Block/BlockBase.php \Drupal\Core\Block\BlockBase::buildConfigurationForm()

Overrides PluginFormInterface::buildConfigurationForm

2 calls to BlockBase::buildConfigurationForm()
InlineBlock::buildConfigurationForm in core/modules/layout_builder/src/Plugin/Block/InlineBlock.php
Form constructor.
ViewsBlockBase::buildConfigurationForm in core/modules/views/src/Plugin/Block/ViewsBlockBase.php
Form constructor.
2 methods override BlockBase::buildConfigurationForm()
InlineBlock::buildConfigurationForm in core/modules/layout_builder/src/Plugin/Block/InlineBlock.php
Form constructor.
ViewsBlockBase::buildConfigurationForm in core/modules/views/src/Plugin/Block/ViewsBlockBase.php
Form constructor.

File

core/lib/Drupal/Core/Block/BlockBase.php, line 34

Class

BlockBase
Defines a base block implementation that most blocks plugins will extend.

Namespace

Drupal\Core\Block

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $form = $this->traitBuildConfigurationForm($form, $form_state);
    // Add context mapping UI form elements.
    $contexts = $form_state->getTemporaryValue('gathered_contexts') ?: [];
    $form['context_mapping'] = $this->addContextAssignmentElement($this, $contexts);
    return $form;
}

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