You are here

public function LayoutDefault::buildConfigurationForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Layout/LayoutDefault.php \Drupal\Core\Layout\LayoutDefault::buildConfigurationForm()
  2. 9 core/lib/Drupal/Core/Layout/LayoutDefault.php \Drupal\Core\Layout\LayoutDefault::buildConfigurationForm()
2 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.

File

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

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;
}