public function ContextRepository::getAvailableContexts in GraphQL 8.3
Gets all available contexts for the purposes of configuration.
Return value
\Drupal\Core\Plugin\Context\ContextInterface[] All available contexts.
Overrides ContextRepositoryInterface::getAvailableContexts
File
- src/
GraphQL/ Context/ ContextRepository.php, line 49
Class
- ContextRepository
- Non-lazy un-optimized context repository.
Namespace
Drupal\graphql\GraphQL\ContextCode
public function getAvailableContexts() {
$contexts = [];
foreach ($this->contextProviders as $contextProvider) {
foreach ($contextProvider
->getAvailableContexts() as $id => $context) {
$contexts[$id] = $context;
}
}
return $contexts;
}