function MultiWidthLayoutBase::buildConfigurationForm

Same name in other branches
  1. 9 core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php \Drupal\layout_builder\Plugin\Layout\MultiWidthLayoutBase::buildConfigurationForm()
  2. 8.9.x core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php \Drupal\layout_builder\Plugin\Layout\MultiWidthLayoutBase::buildConfigurationForm()
  3. 11.x core/modules/layout_builder/src/Plugin/Layout/MultiWidthLayoutBase.php \Drupal\layout_builder\Plugin\Layout\MultiWidthLayoutBase::buildConfigurationForm()

Overrides LayoutDefault::buildConfigurationForm

File

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

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

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