1 | <?php |
||
2 | |||
3 | use AbterPhp\Admin\Bootstrappers; |
||
4 | use AbterPhp\Admin\Console; |
||
5 | use AbterPhp\Admin\Events; |
||
6 | use AbterPhp\Admin\Http; |
||
7 | use AbterPhp\Framework\Constant\Event; |
||
8 | use AbterPhp\Framework\Constant\Module; |
||
9 | use AbterPhp\Framework\Constant\Priorities; |
||
10 | |||
11 | return [ |
||
12 | Module::IDENTIFIER => 'AbterPhp\Admin', |
||
13 | Module::DEPENDENCIES => ['AbterPhp\Framework'], |
||
14 | Module::ENABLED => true, |
||
15 | Module::BOOTSTRAPPERS => [ |
||
16 | Bootstrappers\Orm\OrmBootstrapper::class, |
||
17 | Bootstrappers\Validation\ValidatorBootstrapper::class, |
||
18 | ], |
||
19 | Module::CLI_BOOTSTRAPPERS => [ |
||
20 | Bootstrappers\Console\Commands\CommandsBootstrapper::class, |
||
21 | Bootstrappers\Database\MigrationsBootstrapper::class, |
||
22 | ], |
||
23 | Module::HTTP_BOOTSTRAPPERS => [ |
||
24 | Bootstrappers\Http\Controllers\Execute\LoginBootstrapper::class, |
||
25 | Bootstrappers\Http\Controllers\Form\LoginBootstrapper::class, |
||
26 | Bootstrappers\Http\Controllers\Form\UserBootstrapper::class, |
||
27 | Bootstrappers\Http\Views\BuildersBootstrapper::class, |
||
28 | Bootstrappers\Vendor\SlugifyBootstrapper::class, |
||
29 | ], |
||
30 | Module::COMMANDS => [ |
||
31 | Console\Commands\User\Create::class, |
||
32 | Console\Commands\User\Delete::class, |
||
33 | Console\Commands\User\UpdatePassword::class, |
||
34 | Console\Commands\UserGroup\Display::class, |
||
35 | ], |
||
36 | Module::EVENTS => [ |
||
37 | Event::AUTH_READY => [ |
||
38 | /** @see Events\Listeners\AuthInitializer::handle */ |
||
39 | sprintf('%s@handle', Events\Listeners\AuthInitializer::class), |
||
40 | ], |
||
41 | Event::NAVIGATION_READY => [ |
||
42 | /** @see Events\Listeners\NavigationBuilder::handle */ |
||
43 | sprintf('%s@handle', Events\Listeners\NavigationBuilder::class), |
||
44 | ], |
||
45 | Event::ENTITY_POST_CHANGE => [ |
||
46 | /** @see Events\Listeners\AuthInvalidator::handle */ |
||
47 | sprintf('%s@handle', Events\Listeners\AuthInvalidator::class), |
||
48 | ], |
||
49 | Event::DASHBOARD_READY => [ |
||
50 | /** @see Events\Listeners\DashboardRegistrar::build */ |
||
51 | sprintf('%s@handle', Events\Listeners\DashboardBuilder::class), |
||
52 | ], |
||
53 | ], |
||
54 | Module::MIDDLEWARE => [ |
||
55 | Priorities::NORMAL => [ |
||
56 | Http\Middleware\CheckCsrfToken::class, |
||
57 | Http\Middleware\Security::class, |
||
58 | ], |
||
59 | ], |
||
60 | Module::ROUTE_PATHS => [ |
||
61 | Priorities::NORMAL => [ |
||
62 | __DIR__ . '/admin-routes.php', |
||
63 | __DIR__ . '/login-routes.php', |
||
64 | ], |
||
65 | ], |
||
66 | Module::MIGRATION_PATHS => [ |
||
67 | Priorities::NORMAL => [ |
||
68 | realpath(__DIR__ . '/src/Databases/Migrations'), |
||
69 | ], |
||
70 | ], |
||
71 | Module::RESOURCE_PATH => realpath(__DIR__ . '/resources'), |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
72 | ]; |
||
73 |