You are here

public function ProviderRepository::getAll in Drupal 9

Same name in this branch
  1. 9 core/modules/media/src/OEmbed/ProviderRepository.php \Drupal\media\OEmbed\ProviderRepository::getAll()
  2. 9 core/modules/media/tests/modules/media_test_oembed/src/ProviderRepository.php \Drupal\media_test_oembed\ProviderRepository::getAll()
Same name and namespace in other branches
  1. 8 core/modules/media/tests/modules/media_test_oembed/src/ProviderRepository.php \Drupal\media_test_oembed\ProviderRepository::getAll()

Returns information on all available oEmbed providers.

Return value

\Drupal\media\OEmbed\Provider[] Returns an array of provider value objects, keyed by provider name.

Throws

\Drupal\media\OEmbed\ProviderException If the oEmbed provider information cannot be retrieved.

Overrides ProviderRepository::getAll

File

core/modules/media/tests/modules/media_test_oembed/src/ProviderRepository.php, line 19

Class

ProviderRepository
Overrides the oEmbed provider repository service for testing purposes.

Namespace

Drupal\media_test_oembed

Code

public function getAll() {
  return \Drupal::state()
    ->get(static::class) ?: parent::getAll();
}