You are here

private function BootstrapLayoutDeriver::getIconMap in Bootstrap Layout Builder 2.x

Same name and namespace in other branches
  1. 1.x src/Plugin/Deriver/BootstrapLayoutDeriver.php \Drupal\bootstrap_layout_builder\Plugin\Deriver\BootstrapLayoutDeriver::getIconMap()

Get the icon map array based on columns_count.

Parameters

int $columns_count: The count of row columns.

Return value

array The icon map array.

1 call to BootstrapLayoutDeriver::getIconMap()
BootstrapLayoutDeriver::getDerivativeDefinitions in src/Plugin/Deriver/BootstrapLayoutDeriver.php
Gets the definition of all derivatives of a base plugin.

File

src/Plugin/Deriver/BootstrapLayoutDeriver.php, line 127

Class

BootstrapLayoutDeriver
Makes a bootstrap layout for each layout config entity.

Namespace

Drupal\bootstrap_layout_builder\Plugin\Deriver

Code

private function getIconMap(int $columns_count) {
  $row = [];
  for ($i = 1; $i <= $columns_count; $i++) {
    $row[] = 'square_' . $this
      ->formatNumberInLetters($i);
  }
  $icon_map = [
    $row,
  ];
  return $icon_map;
}