You are here

public function MultiWidthLayoutBase::buildConfigurationForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php \Drupal\layout_builder\Plugin\Layout\MultiWidthLayoutBase::buildConfigurationForm()
  2. 9 core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php \Drupal\layout_builder\Plugin\Layout\MultiWidthLayoutBase::buildConfigurationForm()

File

core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php, line 30

Class

MultiWidthLayoutBase
Base class of layouts with configurable widths.

Namespace

Drupal\layout_builder\Plugin\Layout

Code

public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
  $form['column_widths'] = [
    '#type' => 'select',
    '#title' => $this
      ->t('Column widths'),
    '#default_value' => $this->configuration['column_widths'],
    '#options' => $this
      ->getWidthOptions(),
    '#description' => $this
      ->t('Choose the column widths for this layout.'),
  ];
  return parent::buildConfigurationForm($form, $form_state);
}