From: Allen Shaw Date: Mon, 1 Feb 2016 05:35:12 +0000 (-0600) Subject: Added CRM_Utils_System_Drupal8::getModules(). X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c4b3a8ba60467cae8f977f3861a5d63a64a3b064;p=civicrm-core.git Added CRM_Utils_System_Drupal8::getModules(). --- 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; + } + }