You are here

protected function BaseTwoColumnsLayout::getColumnWidthOptions in Layout Builder Base 8

Gets the column width options for the configuration form.

Return value

string[] The column 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 DefaultLayoutBase::getColumnWidthOptions

1 call to BaseTwoColumnsLayout::getColumnWidthOptions()
BaseTwoColumnsLayout::getDefaultColumnWidth in modules/layout_builder_base_library/src/Plugin/Layout/BaseTwoColumnsLayout.php
Get the default column width option.

File

modules/layout_builder_base_library/src/Plugin/Layout/BaseTwoColumnsLayout.php, line 33

Class

BaseTwoColumnsLayout
Configurable layout plugin class.

Namespace

Drupal\layout_builder_base_library\Plugin\Layout

Code

protected function getColumnWidthOptions() {
  $options = [
    'layout--column-width--default' => $this
      ->t('50% - 50%'),
    'layout--column-width--33-67' => $this
      ->t('33% - 67%'),
    'layout--column-width--67-33' => $this
      ->t('67% - 33%'),
    'layout--column-width--25-75' => $this
      ->t('25% - 75%'),
    'layout--column-width--75-25' => $this
      ->t('75% - 25%'),
  ];
  $this->moduleHandler
    ->alter('layout_builder_base_two_column_width', $options);
  return $options;
}