BreakpointManager::getGroupLabel

protected BreakpointManager::getGroupLabel($group)

Gets the label for a breakpoint group.

Parameters

string $group: The breakpoint group.

Return value

string The label.

File

core/modules/breakpoint/src/BreakpointManager.php, line 244

Class

BreakpointManager
Defines a breakpoint plugin manager to deal with breakpoints.

Namespace

Drupal\breakpoint

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
protected function getGroupLabel($group) {
  // Extension names are not translatable.
  if ($this->moduleHandler->moduleExists($group)) {
    $label = $this->moduleHandler->getName($group);
  }
  elseif ($this->themeHandler->themeExists($group)) {
    $label = $this->themeHandler->getName($group);
  }
  else {
    // Custom group label that should be translatable.
    $label = $this->t($group, array(), array('context' => 'breakpoint'));
  }
  return $label;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.