You are here

public function TypePluginManagerAggregator::getTypeManager in GraphQL 8.3

Retrieves a plugin manager by its type.

Parameters

string $type: The plugin type.

Return value

\Drupal\graphql\Plugin\TypePluginManagerInterface The plugin managers for the given plugin type.

File

src/Plugin/TypePluginManagerAggregator.php, line 38

Class

TypePluginManagerAggregator

Namespace

Drupal\graphql\Plugin

Code

public function getTypeManager($type) {
  if (isset($this->pluginManagers[$type])) {
    return $this->pluginManagers[$type];
  }
  throw new \LogicException(sprintf("Couldn't find a plugin manager for type '%s'.", $type));
}