-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxautoload.system.inc
41 lines (38 loc) · 1.08 KB
/
xautoload.system.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
use Drupal\xautoload\Discovery\WildcardFileFinder;
/**
* Implements hook_modules_enabled()
*
* @param string[] $modules
*/
function xautoload_modules_enabled($modules) {
xautoload()->phaseControl->modulesEnabled($modules);
}
/**
* Implements hook_registry_files_alter()
*
* Support wildcard syntax in the files[] setting in your module's info file.
* See https://drupal.org/node/1976198
*
* This function will remove entries like foo/inc/**, and instead add all the
* individual class files found in the foo/inc/ folder.
*
* @param array[] &$files
* List of files specified in files[] array in module info files.
* Format:
*
* $files['modules/field/field.attach.inc'] = array(
* 'module' => 'field',
* 'weight' => 0,
* );
* // Wildcard syntax.
* $files['sites/all/modules/foo/inc/**'] = array(
* 'module' => 'foo',
* 'weight' => 0,
* );
*/
function xautoload_registry_files_alter(&$files) {
$file_finder = new WildcardFileFinder();
$file_finder->addDrupalPaths($files);
$files = $file_finder->getDrupalFiles();
}