| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('ABSPATH')) { |
| 4 |
exit; // Exit if accessed directly |
| 5 |
} |
| 6 |
|
| 7 |
use IvyForms\Services\Menu\MenuManager; |
| 8 |
use IvyForms\Services\Menu\MenuMapper; |
| 9 |
use IvyForms\Services\Menu\MenuService; |
| 10 |
use IvyForms\Services\Integrations\PluginInstaller; |
| 11 |
use IvyForms\Services\Integrations\IntegrationRegistry; |
| 12 |
use IvyForms\Services\Integrations\IntegrationService; |
| 13 |
use IvyForms\Controllers\Integrations\InstallPluginController; |
| 14 |
use IvyForms\Controllers\Integration\GetAllIntegrationsController; |
| 15 |
use IvyForms\Controllers\Integration\GetIntegrationController; |
| 16 |
use IvyForms\Controllers\Form\ExportFormController; |
| 17 |
use IvyForms\Controllers\Form\ImportFormController; |
| 18 |
use IvyForms\Services\Form\FormService; |
| 19 |
use IvyForms\Services\Form\FormImportExportService; |
| 20 |
use IvyForms\Services\Field\FieldService; |
| 21 |
use IvyForms\Services\Notification\NotificationService; |
| 22 |
use IvyForms\Services\Confirmation\ConfirmationService; |
| 23 |
use IvyForms\Services\Submission\SubmissionDataFormatterService; |
| 24 |
|
| 25 |
return [ |
| 26 |
|
| 27 |
MenuManager::class => function () { |
| 28 |
return new MenuManager( |
| 29 |
new MenuService(), |
| 30 |
new MenuMapper() |
| 31 |
); |
| 32 |
}, |
| 33 |
|
| 34 |
PluginInstaller::class => function () { |
| 35 |
return new PluginInstaller(); |
| 36 |
}, |
| 37 |
|
| 38 |
InstallPluginController::class => function ($container) { |
| 39 |
return new InstallPluginController( |
| 40 |
$container->get(PluginInstaller::class) |
| 41 |
); |
| 42 |
}, |
| 43 |
|
| 44 |
IntegrationRegistry::class => function () { |
| 45 |
return new IntegrationRegistry(); |
| 46 |
}, |
| 47 |
|
| 48 |
IntegrationService::class => function ($container) { |
| 49 |
return new IntegrationService( |
| 50 |
$container->get(IntegrationRegistry::class) |
| 51 |
); |
| 52 |
}, |
| 53 |
SubmissionDataFormatterService::class => function () { |
| 54 |
return new SubmissionDataFormatterService(); |
| 55 |
}, |
| 56 |
|
| 57 |
FormImportExportService::class => function ($container) { |
| 58 |
return new FormImportExportService( |
| 59 |
$container->get(FormService::class), |
| 60 |
$container->get(FieldService::class), |
| 61 |
$container->get(NotificationService::class), |
| 62 |
$container->get(ConfirmationService::class) |
| 63 |
); |
| 64 |
}, |
| 65 |
|
| 66 |
ExportFormController::class => function ($container) { |
| 67 |
return new ExportFormController( |
| 68 |
$container->get(FormImportExportService::class) |
| 69 |
); |
| 70 |
}, |
| 71 |
|
| 72 |
ImportFormController::class => function ($container) { |
| 73 |
return new ImportFormController( |
| 74 |
$container->get(FormImportExportService::class) |
| 75 |
); |
| 76 |
}, |
| 77 |
|
| 78 |
// GetAllIntegrationsController::class => function ($container) { |
| 79 |
// return new GetAllIntegrationsController( |
| 80 |
// $container->get(IntegrationRegistry::class) |
| 81 |
// ); |
| 82 |
// }, |
| 83 |
// |
| 84 |
// GetIntegrationController::class => function ($container) { |
| 85 |
// return new GetIntegrationController( |
| 86 |
// $container->get(IntegrationRegistry::class) |
| 87 |
// ); |
| 88 |
// }, |
| 89 |
]; |
| 90 |
|