File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 4545
4646 "icanboogie" : {
4747
48- "config-path" : " config"
49-
48+ "config-path" : " config" ,
49+ "autoconfig-filters" : [ " ICanBoogie \\ Module \\ Hooks::filter_autoconfig " ]
5050 }
5151 }
5252}
Original file line number Diff line number Diff line change 1919
2020class Hooks
2121{
22+ /*
23+ * Config
24+ */
25+
26+ /**
27+ * Adds "modules" directories found in the app directories to `module-path`.
28+ *
29+ * @param array $autoconfig
30+ */
31+ static public function filter_autoconfig (array &$ autoconfig , $ root )
32+ {
33+ $ directories = \ICanBoogie \resolve_app_paths ($ root );
34+
35+ foreach ($ directories as $ directory )
36+ {
37+ if (file_exists ($ directory . 'modules ' ))
38+ {
39+ $ autoconfig ['module-path ' ][] = $ directory . 'modules ' ;
40+ }
41+ }
42+ }
43+
2244 /*
2345 * Events
2446 */
You can’t perform that action at this time.
0 commit comments