Merge pull request #16126 from civicrm/5.21
[civicrm-core.git] / CRM / Utils / Hook / Drupal8.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 *
14 * @package CiviCRM_Hook
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
16 */
17 class CRM_Utils_Hook_Drupal8 extends CRM_Utils_Hook_DrupalBase {
18
19 /**
20 * {@inheritdoc}
21 */
22 protected function getDrupalModules() {
23 if (class_exists('\Drupal') && \Drupal::hasContainer()) {
24 return array_keys(\Drupal::moduleHandler()->getModuleList());
25 }
26 }
27
28 }