-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.php
26 lines (20 loc) · 905 Bytes
/
module.php
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
<?php
namespace Hartenthaler\Webtrees\Module\ClippingsCartEnhanced;
use Fisharebest\Webtrees\Webtrees;
use function app;
//webtrees major version switch
if (defined("WT_MODULES_DIR")) {
//this is a webtrees 2.x module. it cannot be used with webtrees 1.x. See README.md.
return;
} else {
$modulesPath = Webtrees::MODULES_PATH;
}
//add our own, and other (vesta_common, ...), dependencies
//note: in the current module system, this would happen anyway because all module.php's are executed
//whenever a single module is loaded (assuming these autoload.php's are called by the respective module.php's)
//so we aren't loading 'too much' here.
//DO NOT USE $file HERE! see Module.loadModule($file) - we must not change that var!
foreach (glob(Webtrees::ROOT_DIR . $modulesPath . '*/autoload.php') as $autoloadFile) {
require_once $autoloadFile;
}
return app(ClippingsCartModuleEnhanced::class);