|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* This file is part of the Spryker Commerce OS. |
|
5
|
|
|
* For full license information, please view the LICENSE file that was distributed with this source code. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
declare(strict_types = 1); |
|
9
|
|
|
|
|
10
|
|
|
namespace Pyz\Zed\CompanyUser; |
|
11
|
|
|
|
|
12
|
|
|
use Spryker\Zed\CompanyBusinessUnit\Communication\Plugin\CompanyUser\AssignDefaultBusinessUnitToCompanyUserPlugin; |
|
13
|
|
|
use Spryker\Zed\CompanyBusinessUnit\Communication\Plugin\CompanyUser\CheckCompanyUserUniquenessCompanyUserSavePreCheckPlugin; |
|
14
|
|
|
use Spryker\Zed\CompanyBusinessUnit\Communication\Plugin\CompanyUser\CompanyBusinessUnitHydratePlugin; |
|
15
|
|
|
use Spryker\Zed\CompanyRole\Communication\Plugin\CompanyUser\AssignDefaultCompanyUserRolePlugin; |
|
16
|
|
|
use Spryker\Zed\CompanyRole\Communication\Plugin\CompanyUser\AssignRolesCompanyUserPostCreatePlugin; |
|
17
|
|
|
use Spryker\Zed\CompanyRole\Communication\Plugin\CompanyUser\AssignRolesCompanyUserPostSavePlugin; |
|
18
|
|
|
use Spryker\Zed\CompanyRole\Communication\Plugin\CompanyUser\CompanyRoleCollectionHydratePlugin; |
|
19
|
|
|
use Spryker\Zed\CompanyUser\CompanyUserDependencyProvider as SprykerCompanyUserDependencyProvider; |
|
20
|
|
|
use Spryker\Zed\Customer\Communication\Plugin\CompanyUser\CustomerInvalidationCompanyUserPostUpdatePlugin; |
|
21
|
|
|
use Spryker\Zed\MerchantRelationRequest\Communication\Plugin\CompanyUser\MerchantRelationRequestCompanyUserPreDeletePlugin; |
|
22
|
|
|
use Spryker\Zed\MerchantRelationship\Communication\Plugin\CompanyUser\MerchantRelationshipHydratePlugin; |
|
23
|
|
|
use Spryker\Zed\OauthPermission\Communication\Plugin\CompanyUser\OauthPermissionCompanyUserPostUpdatePlugin; |
|
24
|
|
|
use Spryker\Zed\QuoteRequest\Communication\Plugin\CompanyUserExtension\QuoteRequestCompanyUserPreDeletePlugin; |
|
25
|
|
|
use Spryker\Zed\SharedCart\Communication\Plugin\CompanyUserExtension\SharedCartCompanyUserPreDeletePlugin; |
|
26
|
|
|
use Spryker\Zed\ShoppingList\Communication\Plugin\CompanyUser\ShoppingListCompanyUserPreDeletePlugin; |
|
27
|
|
|
|
|
28
|
|
|
class CompanyUserDependencyProvider extends SprykerCompanyUserDependencyProvider |
|
29
|
|
|
{ |
|
30
|
|
|
/** |
|
31
|
|
|
* @return array<\Spryker\Zed\CompanyUserExtension\Dependency\Plugin\CompanyUserHydrationPluginInterface> |
|
32
|
|
|
*/ |
|
33
|
|
|
protected function getCompanyUserHydrationPlugins(): array |
|
34
|
|
|
{ |
|
35
|
|
|
return [ |
|
36
|
|
|
new CompanyBusinessUnitHydratePlugin(), |
|
37
|
|
|
new MerchantRelationshipHydratePlugin(), |
|
38
|
|
|
new CompanyRoleCollectionHydratePlugin(), |
|
39
|
|
|
]; |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* @return array<\Spryker\Zed\CompanyUserExtension\Dependency\Plugin\CompanyUserPostCreatePluginInterface> |
|
44
|
|
|
*/ |
|
45
|
|
|
protected function getCompanyUserPostCreatePlugins(): array |
|
46
|
|
|
{ |
|
47
|
|
|
return [ |
|
48
|
|
|
new AssignRolesCompanyUserPostCreatePlugin(), |
|
49
|
|
|
new AssignDefaultCompanyUserRolePlugin(), |
|
50
|
|
|
]; |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @return array<\Spryker\Zed\CompanyUserExtension\Dependency\Plugin\CompanyUserPreSavePluginInterface> |
|
55
|
|
|
*/ |
|
56
|
|
|
protected function getCompanyUserPreSavePlugins(): array |
|
57
|
|
|
{ |
|
58
|
|
|
return [ |
|
59
|
|
|
new AssignDefaultBusinessUnitToCompanyUserPlugin(), |
|
60
|
|
|
]; |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
/** |
|
64
|
|
|
* @return array<\Spryker\Zed\CompanyUserExtension\Dependency\Plugin\CompanyUserPostSavePluginInterface> |
|
65
|
|
|
*/ |
|
66
|
|
|
protected function getCompanyUserPostSavePlugins(): array |
|
67
|
|
|
{ |
|
68
|
|
|
return [ |
|
69
|
|
|
new AssignRolesCompanyUserPostSavePlugin(), |
|
70
|
|
|
]; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* @return array<\Spryker\Zed\CompanyUserExtension\Dependency\Plugin\CompanyUserPreDeletePluginInterface> |
|
75
|
|
|
*/ |
|
76
|
|
|
protected function getCompanyUserPreDeletePlugins(): array |
|
77
|
|
|
{ |
|
78
|
|
|
return [ |
|
79
|
|
|
new ShoppingListCompanyUserPreDeletePlugin(), |
|
80
|
|
|
new SharedCartCompanyUserPreDeletePlugin(), |
|
81
|
|
|
new QuoteRequestCompanyUserPreDeletePlugin(), |
|
82
|
|
|
new MerchantRelationRequestCompanyUserPreDeletePlugin(), |
|
83
|
|
|
]; |
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
/** |
|
87
|
|
|
* @return array<\Spryker\Zed\CompanyUserExtension\Dependency\Plugin\CompanyUserSavePreCheckPluginInterface> |
|
88
|
|
|
*/ |
|
89
|
|
|
protected function getCompanyUserSavePreCheckPlugins(): array |
|
90
|
|
|
{ |
|
91
|
|
|
return [ |
|
92
|
|
|
new CheckCompanyUserUniquenessCompanyUserSavePreCheckPlugin(), |
|
93
|
|
|
]; |
|
94
|
|
|
} |
|
95
|
|
|
|
|
96
|
|
|
/** |
|
97
|
|
|
* @return array<\Spryker\Zed\CompanyUserExtension\Dependency\Plugin\CompanyUserPostUpdatePluginInterface> |
|
98
|
|
|
*/ |
|
99
|
|
|
protected function getCompanyUserPostUpdatePlugins(): array |
|
100
|
|
|
{ |
|
101
|
|
|
return [ |
|
102
|
|
|
new OauthPermissionCompanyUserPostUpdatePlugin(), |
|
103
|
|
|
new CustomerInvalidationCompanyUserPostUpdatePlugin(), |
|
104
|
|
|
]; |
|
105
|
|
|
} |
|
106
|
|
|
} |
|
107
|
|
|
|