X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FHook%2FDrupal8.php;h=0c505c16a0c4ba6e90a7a91959edf0139108bc8c;hb=d1c0c69c2308d8582cc135df5f40688768c6b11b;hp=137a05e8913cccd195d276eb8cc300d4d30cff18;hpb=6b15c957f401213017ed76c24b8de34376ddbda8;p=civicrm-core.git diff --git a/CRM/Utils/Hook/Drupal8.php b/CRM/Utils/Hook/Drupal8.php index 137a05e891..0c505c16a0 100644 --- a/CRM/Utils/Hook/Drupal8.php +++ b/CRM/Utils/Hook/Drupal8.php @@ -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. | | | @@ -28,8 +28,17 @@ /** * * @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()); + } + } + }