media.api.php 442 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * @file
  4. * Hooks related to Media and its plugins.
  5. */
  6. /**
  7. * @addtogroup hooks
  8. * @{
  9. */
  10. /**
  11. * Alters the information provided in \Drupal\media\Annotation\MediaSource.
  12. *
  13. * @param array $sources
  14. * The array of media source plugin definitions, keyed by plugin ID.
  15. */
  16. function hook_media_source_info_alter(array &$sources) {
  17. $sources['youtube']['label'] = t('Youtube rocks!');
  18. }
  19. /**
  20. * @} End of "addtogroup hooks".
  21. */