Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / fontyourface / modules / adobe_edge_fonts / adobe_edge_fonts.module
index 5a859a0531262f49638115ae7dece74fecc1de64..18d32b6a30206e224b4fb866430545a0f7362261 100644 (file)
@@ -5,6 +5,8 @@
  * Adobe Edge Fonts module file.
  */
 
+use Drupal\Core\Link;
+
 /**
  * Implements hook_fontyourface_api().
  */
@@ -15,6 +17,18 @@ function adobe_edge_fonts_fontyourface_api() {
   ];
 }
 
+/**
+ * Implements hook_modules_installed().
+ *
+ * Use this hook instead of hook_install, because the route "font.settings" is
+ * not defined otherwise.
+ */
+function adobe_edge_fonts_modules_installed($modules) {
+  if (in_array('adobe_edge_fonts', $modules)) {
+    drupal_set_message(t('Due to the number of fonts, automated import from install for Adobe Edge Fonts is disabled. Please use @link to import Adobe Edge Fonts.', ['@link' => Link::createFromRoute('@font-your-face settings', 'font.settings')->toString()]));
+  }
+}
+
 /**
  * Implements hook_page_attachments().
  */