function LayoutDefault::buildConfigurationForm

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Layout/LayoutDefault.php \Drupal\Core\Layout\LayoutDefault::buildConfigurationForm()
  2. 10 core/lib/Drupal/Core/Layout/LayoutDefault.php \Drupal\Core\Layout\LayoutDefault::buildConfigurationForm()
  3. 8.9.x core/lib/Drupal/Core/Layout/LayoutDefault.php \Drupal\Core\Layout\LayoutDefault::buildConfigurationForm()
1 method overrides LayoutDefault::buildConfigurationForm()
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.