summaryrefslogtreecommitdiffstats
path: root/core/modules/media/media.api.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/media/media.api.php')
-rw-r--r--core/modules/media/media.api.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/core/modules/media/media.api.php b/core/modules/media/media.api.php
new file mode 100644
index 0000000..8de1c64
--- /dev/null
+++ b/core/modules/media/media.api.php
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * @file
+ * Hooks related to Media and its plugins.
+ */
+
+/**
+ * @addtogroup hooks
+ * @{
+ */
+
+/**
+ * Alters the information provided in \Drupal\media\Annotation\MediaSource.
+ *
+ * @param array $sources
+ * The array of media source plugin definitions, keyed by plugin ID.
+ */
+function hook_media_source_info_alter(array &$sources) {
+ $sources['youtube']['label'] = t('Youtube rocks!');
+}
+
+/**
+ * @} End of "addtogroup hooks".
+ */