function hook_media_source_info_alter
Same name in other branches
- 9 core/modules/media/media.api.php \hook_media_source_info_alter()
- 8.9.x core/modules/media/media.api.php \hook_media_source_info_alter()
- 10 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
1 function implements 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
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 25
Code
function hook_media_source_info_alter(array &$sources) {
$sources['youtube']['label'] = t('Youtube rocks!');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.