You are here

public function StyleDiscovery::getStyleGroupsLabel in Paragraphs Collection 8

Gets style groups label.

Return value

array Collection of style groups labels.

Overrides StyleDiscoveryInterface::getStyleGroupsLabel

File

src/StyleDiscovery.php, line 280

Class

StyleDiscovery
Provides common helper methods for style discovery. @todo Create documentation for style discovery https://www.drupal.org/node/2837995

Namespace

Drupal\paragraphs_collection

Code

public function getStyleGroupsLabel() {
  $groups = $this
    ->getStyleGroups();
  $group_options = [];
  foreach ($groups as $group_id => $group) {
    $group_options[$group_id] = $group['label'];
  }
  return $group_options;
}