function BreakpointManager::getGroupProviders

Same name in other branches
  1. 9 core/modules/breakpoint/src/BreakpointManager.php \Drupal\breakpoint\BreakpointManager::getGroupProviders()
  2. 10 core/modules/breakpoint/src/BreakpointManager.php \Drupal\breakpoint\BreakpointManager::getGroupProviders()
  3. 11.x core/modules/breakpoint/src/BreakpointManager.php \Drupal\breakpoint\BreakpointManager::getGroupProviders()

Overrides BreakpointManagerInterface::getGroupProviders

File

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

Class

BreakpointManager
Defines a breakpoint plugin manager to deal with breakpoints.

Namespace

Drupal\breakpoint

Code

public function getGroupProviders($group) {
    $providers = [];
    $breakpoints = $this->getBreakpointsByGroup($group);
    foreach ($breakpoints as $breakpoint) {
        $provider = $breakpoint->getProvider();
        $extension = FALSE;
        if ($this->moduleHandler
            ->moduleExists($provider)) {
            $extension = $this->moduleHandler
                ->getModule($provider);
        }
        elseif ($this->themeHandler
            ->themeExists($provider)) {
            $extension = $this->themeHandler
                ->getTheme($provider);
        }
        if ($extension) {
            $providers[$extension->getName()] = $extension->getType();
        }
    }
    return $providers;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.