function LayoutDefault::buildConfigurationForm

Same name in other branches
  1. 9 core/lib/Drupal/Core/Layout/LayoutDefault.php \Drupal\Core\Layout\LayoutDefault::buildConfigurationForm()
  2. 8.9.x core/lib/Drupal/Core/Layout/LayoutDefault.php \Drupal\Core\Layout\LayoutDefault::buildConfigurationForm()
  3. 10 core/lib/Drupal/Core/Layout/LayoutDefault.php \Drupal\Core\Layout\LayoutDefault::buildConfigurationForm()

Overrides PluginFormInterface::buildConfigurationForm

1 call to LayoutDefault::buildConfigurationForm()
MultiWidthLayoutBase::buildConfigurationForm in core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php
Form constructor.
3 methods override LayoutDefault::buildConfigurationForm()
LayoutTestPlugin::buildConfigurationForm in core/modules/system/tests/modules/layout_test/src/Plugin/Layout/LayoutTestPlugin.php
Form constructor.
LayoutWithoutLabel::buildConfigurationForm in core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Layout/LayoutWithoutLabel.php
Form constructor.
MultiWidthLayoutBase::buildConfigurationForm in core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php
Form constructor.

File

core/lib/Drupal/Core/Layout/LayoutDefault.php, line 106

Class

LayoutDefault
Provides a default class for Layout plugins.

Namespace

Drupal\Core\Layout

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $form['label'] = [
        '#type' => 'textfield',
        '#title' => $this->t('Administrative label'),
        '#default_value' => $this->configuration['label'],
    ];
    $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.