You are here

protected function BaseOneColumnLayout::getAlignmentOptions in Layout Builder Base 8

Gets the alignment options for the configuration form.

Return value

string[] The alignment 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::getAlignmentOptions

File

modules/layout_builder_base_library/src/Plugin/Layout/BaseOneColumnLayout.php, line 383

Class

BaseOneColumnLayout
Configurable layout plugin class.

Namespace

Drupal\layout_builder_base_library\Plugin\Layout

Code

protected function getAlignmentOptions() {
  $options = [
    '' => $this
      ->t('Default'),
    'layout--alignment--left' => $this
      ->t('Left'),
    'layout--alignment--right' => $this
      ->t('Right'),
    'layout--alignment--center' => $this
      ->t('Center'),
    'layout--alignment--justify' => $this
      ->t('Justify'),
  ];
  $this->moduleHandler
    ->alter('layout_builder_base_alignment', $options);
  return $options;
}