You are here

function hook_media_source_info_alter in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media/media.api.php \hook_media_source_info_alter()

Alters the information provided in \Drupal\media\Annotation\MediaSource.

Parameters

array $sources: The array of media source plugin definitions, keyed by plugin ID.

Related topics

2 functions implement hook_media_source_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

media_library_form_overwrite_test_media_source_info_alter in core/modules/media_library/tests/modules/media_library_form_overwrite_test/media_library_form_overwrite_test.module
media_library_media_source_info_alter in core/modules/media_library/media_library.module
Implements hook_media_source_info_alter().
1 invocation of hook_media_source_info_alter()
MediaSourceManager::__construct in core/modules/media/src/MediaSourceManager.php
Constructs a new MediaSourceManager.

File

core/modules/media/media.api.php, line 19
Hooks related to Media and its plugins.

Code

function hook_media_source_info_alter(array &$sources) {
  $sources['youtube']['label'] = t('Youtube rocks!');
}