You are here

protected function BaseCustomizableColumnsLayout::getCustomizableColumnsOptions in Layout Builder Base 8

Gets the customizable columns options for the configuration form.

Return value

string[] The customizable columns options array where the keys are strings that will be added to the CSS classes and the values are the human readable labels. The modifiers are there for developers in order to implement special logic.

Overrides DefaultLayoutBase::getCustomizableColumnsOptions

File

modules/layout_builder_base_library/src/Plugin/Layout/BaseCustomizableColumnsLayout.php, line 26

Class

BaseCustomizableColumnsLayout
Configurable layout plugin class.

Namespace

Drupal\layout_builder_base_library\Plugin\Layout

Code

protected function getCustomizableColumnsOptions() {
  $options = [
    'layout--customizable-columns--autofit' => $this
      ->t('Autofit'),
    'layout--customizable-columns--autofill' => $this
      ->t('Autofill'),
    'layout--customizable-columns--2-col' => $this
      ->t('2 Columns'),
    'layout--customizable-columns--3-col' => $this
      ->t('3 Columns'),
    'layout--customizable-columns--4-col' => $this
      ->t('4 Columns'),
  ];
  $this->moduleHandler
    ->alter('layout_builder_customizable_columns', $options);
  return $options;
}