From c4b3a8ba60467cae8f977f3861a5d63a64a3b064 Mon Sep 17 00:00:00 2001 From: Allen Shaw Date: Sun, 31 Jan 2016 23:35:12 -0600 Subject: [PATCH] Added CRM_Utils_System_Drupal8::getModules(). --- CRM/Utils/System/Drupal8.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index 1bd2a419da..09f95cd0d5 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -546,4 +546,20 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { } } + /** + * @inheritDoc + */ + public function getModules() { + $modules = array(); + + $module_data = system_rebuild_module_data(); + foreach ($module_data as $module_name => $extension) { + if (!isset($extension->info['hidden']) && $extension->origin != 'core') { + $extension->schema_version = drupal_get_installed_schema_version($module_name); + $modules[] = new CRM_Core_Module('drupal.' . $module_name, ($extension->status == 1 ? TRUE : FALSE)); + } + } + return $modules; + } + } -- 2.25.1