Merge pull request #11757 from eileenmcnaughton/manual
[civicrm-core.git] / CRM / Utils / Hook / Drupal8.php
index 137a05e8913cccd195d276eb8cc300d4d30cff18..0c505c16a0c4ba6e90a7a91959edf0139108bc8c 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2017                                |
+ | Copyright CiviCRM LLC (c) 2004-2018                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 /**
  *
  * @package CiviCRM_Hook
- * @copyright CiviCRM LLC (c) 2004-2017
+ * @copyright CiviCRM LLC (c) 2004-2018
  */
 class CRM_Utils_Hook_Drupal8 extends CRM_Utils_Hook_DrupalBase {
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function getDrupalModules() {
+    if (class_exists('\Drupal') && \Drupal::hasContainer()) {
+      return array_keys(\Drupal::moduleHandler()->getModuleList());
+    }
+  }
+
 }