You are here

public function StyleDiscovery::getGroupLabel in Paragraphs Collection 8

Gets group label.

Parameters

string $group_id: The group id.

Return value

string The translatable group label.

Overrides StyleDiscoveryInterface::getGroupLabel

1 call to StyleDiscovery::getGroupLabel()
StyleDiscovery::getGroupWidgetLabel in src/StyleDiscovery.php
Gets group label for a widget context.

File

src/StyleDiscovery.php, line 292

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 getGroupLabel($group_id) {
  $groups = $this
    ->getStyleGroups();
  if (isset($groups[$group_id])) {
    return $groups[$group_id]['label'];
  }
  return NULL;
}