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\Yves\CustomerPage; |
11
|
|
|
|
12
|
|
|
use Spryker\Yves\Kernel\Container; |
13
|
|
|
use Spryker\Yves\MerchantShipment\Plugin\CustomerPage\MerchantShipmentCheckoutAddressStepPreGroupItemsByShipmentPlugin; |
14
|
|
|
use Spryker\Yves\MultiFactorAuth\Plugin\AuthenticationHandler\Customer\CustomerMultiFactorAuthenticationHandlerPlugin; |
15
|
|
|
use SprykerShop\Yves\AgentPage\Plugin\Security\UpdateAgentTokenAfterCustomerAuthenticationSuccessPlugin; |
16
|
|
|
use SprykerShop\Yves\CompanyPage\Plugin\CustomerPage\BusinessOnBehalfCompanyUserRedirectAfterLoginStrategyPlugin; |
17
|
|
|
use SprykerShop\Yves\CompanyPage\Plugin\CustomerPage\CompanyBusinessUnitOrderSearchFormExpanderPlugin; |
18
|
|
|
use SprykerShop\Yves\CompanyPage\Plugin\CustomerPage\CompanyBusinessUnitOrderSearchFormHandlerPlugin; |
19
|
|
|
use SprykerShop\Yves\CompanyPage\Plugin\CustomerPage\CompanyUserPreAuthUserCheckPlugin; |
20
|
|
|
use SprykerShop\Yves\CompanyUserInvitationPage\Plugin\CompanyUserInvitationPreRegistrationCustomerTransferExpanderPlugin; |
21
|
|
|
use SprykerShop\Yves\CustomerPage\CustomerPageDependencyProvider as SprykerShopCustomerPageDependencyProvider; |
22
|
|
|
use SprykerShop\Yves\CustomerPage\Plugin\CustomerPage\RedirectUriCustomerRedirectStrategyPlugin; |
23
|
|
|
use SprykerShop\Yves\SessionAgentValidation\Plugin\CustomerPage\UpdateAgentSessionAfterCustomerAuthenticationSuccessPlugin; |
24
|
|
|
|
25
|
|
|
class CustomerPageDependencyProvider extends SprykerShopCustomerPageDependencyProvider |
26
|
|
|
{ |
27
|
|
|
/** |
28
|
|
|
* @var string |
29
|
|
|
*/ |
30
|
|
|
public const CLIENT_PYZ_SESSION = 'CLIENT_PYZ_SESSION'; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @param \Spryker\Yves\Kernel\Container $container |
34
|
|
|
* |
35
|
|
|
* @return \Spryker\Yves\Kernel\Container |
36
|
|
|
*/ |
37
|
|
|
public function provideDependencies(Container $container): Container |
38
|
|
|
{ |
39
|
|
|
$container = parent::provideDependencies($container); |
40
|
|
|
|
41
|
|
|
$container = $this->addPyzSessionClient($container); |
42
|
|
|
|
43
|
|
|
return $container; |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\PreRegistrationCustomerTransferExpanderPluginInterface> |
48
|
|
|
*/ |
49
|
|
|
protected function getPreRegistrationCustomerTransferExpanderPlugins(): array |
50
|
|
|
{ |
51
|
|
|
return [ |
52
|
|
|
new CompanyUserInvitationPreRegistrationCustomerTransferExpanderPlugin(), #BulkImportCompanyUserInvitationsFeature |
53
|
|
|
]; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\CustomerRedirectStrategyPluginInterface> |
58
|
|
|
*/ |
59
|
|
|
protected function getAfterLoginCustomerRedirectPlugins(): array |
60
|
|
|
{ |
61
|
|
|
return [ |
62
|
|
|
new BusinessOnBehalfCompanyUserRedirectAfterLoginStrategyPlugin(), #BusinessOnBehalfFeature |
63
|
|
|
new RedirectUriCustomerRedirectStrategyPlugin(), |
64
|
|
|
]; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @return list<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\AfterCustomerAuthenticationSuccessPluginInterface> |
69
|
|
|
*/ |
70
|
|
|
protected function getAfterCustomerAuthenticationSuccessPlugins(): array |
71
|
|
|
{ |
72
|
|
|
return [ |
|
|
|
|
73
|
|
|
new UpdateAgentTokenAfterCustomerAuthenticationSuccessPlugin(), |
74
|
|
|
new UpdateAgentSessionAfterCustomerAuthenticationSuccessPlugin(), |
75
|
|
|
]; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @param \Spryker\Yves\Kernel\Container $container |
80
|
|
|
* |
81
|
|
|
* @return \Spryker\Yves\Kernel\Container |
82
|
|
|
*/ |
83
|
|
|
protected function addPyzSessionClient(Container $container): Container |
84
|
|
|
{ |
85
|
|
|
$container->set(static::CLIENT_PYZ_SESSION, function (Container $container) { |
86
|
|
|
return $container->getLocator()->session()->client(); |
87
|
|
|
}); |
88
|
|
|
|
89
|
|
|
return $container; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\OrderSearchFormExpanderPluginInterface> |
94
|
|
|
*/ |
95
|
|
|
protected function getOrderSearchFormExpanderPlugins(): array |
96
|
|
|
{ |
97
|
|
|
return [ |
98
|
|
|
new CompanyBusinessUnitOrderSearchFormExpanderPlugin(), |
99
|
|
|
]; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\OrderSearchFormHandlerPluginInterface> |
104
|
|
|
*/ |
105
|
|
|
protected function getOrderSearchFormHandlerPlugins(): array |
106
|
|
|
{ |
107
|
|
|
return [ |
108
|
|
|
new CompanyBusinessUnitOrderSearchFormHandlerPlugin(), |
109
|
|
|
]; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\PreAuthUserCheckPluginInterface> |
114
|
|
|
*/ |
115
|
|
|
protected function getPreAuthUserCheckPlugins(): array |
116
|
|
|
{ |
117
|
|
|
return [ |
118
|
|
|
new CompanyUserPreAuthUserCheckPlugin(), |
119
|
|
|
]; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\CheckoutAddressStepPreGroupItemsByShipmentPluginInterface> |
124
|
|
|
*/ |
125
|
|
|
protected function getCheckoutAddressStepPreGroupItemsByShipmentPlugins(): array |
126
|
|
|
{ |
127
|
|
|
return [ |
128
|
|
|
new MerchantShipmentCheckoutAddressStepPreGroupItemsByShipmentPlugin(), |
129
|
|
|
]; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @return array<\SprykerShop\Yves\CustomerPageExtension\Dependency\Plugin\AuthenticationHandlerPluginInterface> |
134
|
|
|
*/ |
135
|
|
|
protected function getCustomerAuthenticationHandlerPlugins(): array |
136
|
|
|
{ |
137
|
|
|
return [ |
138
|
|
|
new CustomerMultiFactorAuthenticationHandlerPlugin(), |
139
|
|
|
]; |
140
|
|
|
} |
141
|
|
|
} |
142
|
|
|
|