You are here

protected function TwoColumnLayout::getWidthOptions in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Plugin/Layout/TwoColumnLayout.php \Drupal\layout_builder\Plugin\Layout\TwoColumnLayout::getWidthOptions()

Gets the width options for the configuration form.

The first option will be used as the default 'column_widths' configuration value.

Return value

string[] The width options array where the keys are strings that will be added to the CSS classes and the values are the human readable labels.

Overrides MultiWidthLayoutBase::getWidthOptions

File

core/modules/layout_builder/src/Plugin/Layout/TwoColumnLayout.php, line 16

Class

TwoColumnLayout
Configurable two column layout plugin class.

Namespace

Drupal\layout_builder\Plugin\Layout

Code

protected function getWidthOptions() {
  return [
    '50-50' => '50%/50%',
    '33-67' => '33%/67%',
    '67-33' => '67%/33%',
    '25-75' => '25%/75%',
    '75-25' => '75%/25%',
  ];
}