Gets group label for a widget context.
string $group_id: The group id.
\Drupal\Core\StringTranslation\TranslatableMarkup The translatable group label.
Overrides StyleDiscoveryInterface::getGroupWidgetLabel
public function getGroupWidgetLabel($group_id) {
$groups = $this
->getStyleGroups();
if (isset($groups[$group_id])) {
// If the widget label is empty use the general label and add a "style
// suffix".
if ($widget_label = $groups[$group_id]['widget_label']) {
return $widget_label;
}
else {
return $this
->t('@group_label style', [
'@group_label' => $this
->getGroupLabel($group_id),
]);
}
}
return NULL;
}