|
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
|
|
|
namespace Pyz\Yves\Router; |
|
9
|
|
|
|
|
10
|
|
|
use Pyz\Yves\ExampleProductSalePage\Plugin\Router\ExampleProductSaleRouteProviderPlugin; |
|
11
|
|
|
use Pyz\Yves\MultiCartPage\Plugin\Router\MultiCartPageRouteProviderPlugin; |
|
12
|
|
|
use Spryker\Yves\HealthCheck\Plugin\Router\HealthCheckRouteProviderPlugin; |
|
13
|
|
|
use Spryker\Yves\Router\Plugin\RouteManipulator\LanguageDefaultPostAddRouteManipulatorPlugin; |
|
14
|
|
|
use Spryker\Yves\Router\Plugin\RouteManipulator\SslPostAddRouteManipulatorPlugin; |
|
15
|
|
|
use Spryker\Yves\Router\Plugin\RouteManipulator\StoreDefaultPostAddRouteManipulatorPlugin; |
|
16
|
|
|
use Spryker\Yves\Router\Plugin\Router\YvesDevelopmentRouterPlugin; |
|
17
|
|
|
use Spryker\Yves\Router\Plugin\Router\YvesRouterPlugin; |
|
18
|
|
|
use Spryker\Yves\Router\Plugin\RouterEnhancer\LanguagePrefixRouterEnhancerPlugin; |
|
19
|
|
|
use Spryker\Yves\Router\Plugin\RouterEnhancer\StorePrefixRouterEnhancerPlugin; |
|
20
|
|
|
use Spryker\Yves\Router\RouterDependencyProvider as SprykerRouterDependencyProvider; |
|
21
|
|
|
use SprykerShop\Yves\AgentPage\Plugin\Router\AgentPageRouteProviderPlugin; |
|
22
|
|
|
use SprykerShop\Yves\AgentWidget\Plugin\Router\AgentWidgetRouteProviderPlugin; |
|
23
|
|
|
use SprykerShop\Yves\AvailabilityNotificationPage\Plugin\Router\AvailabilityNotificationPageRouteProviderPlugin; |
|
24
|
|
|
use SprykerShop\Yves\AvailabilityNotificationWidget\Plugin\Router\AvailabilityNotificationWidgetRouteProviderPlugin; |
|
25
|
|
|
use SprykerShop\Yves\CalculationPage\Plugin\Router\CalculationPageRouteProviderPlugin; |
|
26
|
|
|
use SprykerShop\Yves\CartCodeWidget\Plugin\Router\CartCodeWidgetRouteProviderPlugin; |
|
27
|
|
|
use SprykerShop\Yves\CartNoteWidget\Plugin\Router\CartNoteWidgetRouteProviderPlugin; |
|
28
|
|
|
use SprykerShop\Yves\CartPage\Plugin\Router\CartPageRouteProviderPlugin; |
|
29
|
|
|
use SprykerShop\Yves\CatalogPage\Plugin\Router\CatalogPageRouteProviderPlugin; |
|
30
|
|
|
use SprykerShop\Yves\CheckoutPage\Plugin\Router\CheckoutPageRouteProviderPlugin; |
|
31
|
|
|
use SprykerShop\Yves\CmsPage\Plugin\Router\CmsPageRouteProviderPlugin; |
|
32
|
|
|
use SprykerShop\Yves\CmsSearchPage\Plugin\Router\CmsSearchPageRouteProviderPlugin; |
|
33
|
|
|
use SprykerShop\Yves\CommentWidget\Plugin\Router\CommentWidgetRouteProviderPlugin; |
|
34
|
|
|
use SprykerShop\Yves\CompanyPage\Plugin\Router\CompanyPageRouteProviderPlugin; |
|
35
|
|
|
use SprykerShop\Yves\CompanyUserAgentWidget\Plugin\Router\CompanyUserAgentWidgetRouteProviderPlugin; |
|
36
|
|
|
use SprykerShop\Yves\CompanyUserInvitationPage\Plugin\Router\CompanyUserInvitationPageRouteProviderPlugin; |
|
37
|
|
|
use SprykerShop\Yves\ConfigurableBundleNoteWidget\Plugin\Router\ConfigurableBundleNoteWidgetRouteProviderPlugin; |
|
38
|
|
|
use SprykerShop\Yves\ConfigurableBundlePage\Plugin\Router\ConfigurableBundlePageRouteProviderPlugin; |
|
39
|
|
|
use SprykerShop\Yves\ConfigurableBundleWidget\Plugin\Router\ConfigurableBundleWidgetRouteProviderPlugin; |
|
40
|
|
|
use SprykerShop\Yves\CurrencyWidget\Plugin\Router\CurrencyWidgetRouteProviderPlugin; |
|
41
|
|
|
use SprykerShop\Yves\CustomerPage\Plugin\Router\CustomerPageRouteProviderPlugin; |
|
42
|
|
|
use SprykerShop\Yves\CustomerReorderWidget\Plugin\Router\CustomerReorderWidgetRouteProviderPlugin; |
|
43
|
|
|
use SprykerShop\Yves\DiscountWidget\Plugin\Router\DiscountWidgetRouteProviderPlugin; |
|
44
|
|
|
use SprykerShop\Yves\ErrorPage\Plugin\Router\ErrorPageRouteProviderPlugin; |
|
45
|
|
|
use SprykerShop\Yves\FileManagerWidget\Plugin\Router\FileManagerWidgetRouteProviderPlugin; |
|
46
|
|
|
use SprykerShop\Yves\HomePage\Plugin\Router\HomePageRouteProviderPlugin; |
|
47
|
|
|
use SprykerShop\Yves\MerchantProductOfferWidget\Plugin\Router\MerchantProductOfferWidgetRouteProviderPlugin; |
|
48
|
|
|
use SprykerShop\Yves\NewsletterPage\Plugin\Router\NewsletterPageRouteProviderPlugin; |
|
49
|
|
|
use SprykerShop\Yves\NewsletterWidget\Plugin\Router\NewsletterWidgetRouteProviderPlugin; |
|
50
|
|
|
use SprykerShop\Yves\OrderCancelWidget\Plugin\Router\OrderCancelWidgetRouteProviderPlugin; |
|
51
|
|
|
use SprykerShop\Yves\OrderCustomReferenceWidget\Plugin\Router\OrderCustomReferenceWidgetRouteProviderPlugin; |
|
52
|
|
|
use SprykerShop\Yves\PaymentPage\Plugin\Router\PaymentPageRouteProviderPlugin; |
|
53
|
|
|
use SprykerShop\Yves\PersistentCartSharePage\Plugin\Router\PersistentCartSharePageRouteProviderPlugin; |
|
54
|
|
|
use SprykerShop\Yves\PersistentCartShareWidget\Plugin\Router\PersistentCartShareWidgetRouteProviderPlugin; |
|
55
|
|
|
use SprykerShop\Yves\PriceWidget\Plugin\Router\PriceWidgetRouteProviderPlugin; |
|
56
|
|
|
use SprykerShop\Yves\ProductConfiguratorGatewayPage\Plugin\Router\ProductConfiguratorGatewayPageRouteProviderPlugin; |
|
57
|
|
|
use SprykerShop\Yves\ProductNewPage\Plugin\Router\ProductNewPageRouteProviderPlugin; |
|
58
|
|
|
use SprykerShop\Yves\ProductReviewWidget\Plugin\Router\ProductReviewWidgetRouteProviderPlugin; |
|
59
|
|
|
use SprykerShop\Yves\ProductSearchWidget\Plugin\Router\ProductSearchWidgetRouteProviderPlugin; |
|
60
|
|
|
use SprykerShop\Yves\ProductSetListPage\Plugin\Router\ProductSetListPageRouteProviderPlugin; |
|
61
|
|
|
use SprykerShop\Yves\QuickOrderPage\Plugin\Router\QuickOrderPageRouteProviderPlugin; |
|
62
|
|
|
use SprykerShop\Yves\QuoteApprovalWidget\Plugin\Router\QuoteApprovalWidgetRouteProviderPlugin; |
|
63
|
|
|
use SprykerShop\Yves\QuoteRequestAgentPage\Plugin\Router\QuoteRequestAgentPageRouteProviderPlugin; |
|
64
|
|
|
use SprykerShop\Yves\QuoteRequestAgentWidget\Plugin\Router\QuoteRequestAgentWidgetRouteProviderPlugin; |
|
65
|
|
|
use SprykerShop\Yves\QuoteRequestPage\Plugin\Router\QuoteRequestPageRouteProviderPlugin; |
|
66
|
|
|
use SprykerShop\Yves\QuoteRequestWidget\Plugin\Router\QuoteRequestWidgetRouteProviderPlugin; |
|
67
|
|
|
use SprykerShop\Yves\ResourceSharePage\Plugin\Router\ResourceSharePageRouteProviderPlugin; |
|
68
|
|
|
use SprykerShop\Yves\SalesReturnPage\Plugin\Router\SalesReturnPageRouteProviderPlugin; |
|
69
|
|
|
use SprykerShop\Yves\SharedCartPage\Plugin\Router\SharedCartPageRouteProviderPlugin; |
|
70
|
|
|
use SprykerShop\Yves\ShoppingListPage\Plugin\Router\ShoppingListPageRouteProviderPlugin; |
|
71
|
|
|
use SprykerShop\Yves\ShoppingListWidget\Plugin\Router\ShoppingListWidgetRouteProviderPlugin; |
|
72
|
|
|
use SprykerShop\Yves\StorageRouter\Plugin\Router\StorageRouterPlugin; |
|
73
|
|
|
|
|
74
|
|
|
class RouterDependencyProvider extends SprykerRouterDependencyProvider |
|
75
|
|
|
{ |
|
76
|
|
|
/** |
|
77
|
|
|
* @return \Spryker\Yves\RouterExtension\Dependency\Plugin\RouterPluginInterface[] |
|
78
|
|
|
*/ |
|
79
|
|
|
protected function getRouterPlugins(): array |
|
80
|
|
|
{ |
|
81
|
|
|
return [ |
|
82
|
|
|
new YvesRouterPlugin(), |
|
83
|
|
|
new StorageRouterPlugin(), |
|
84
|
|
|
// This router will only be hit, when no other router was able to match/generate. |
|
85
|
|
|
new YvesDevelopmentRouterPlugin(), |
|
86
|
|
|
]; |
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* @return \Spryker\Yves\RouterExtension\Dependency\Plugin\RouteProviderPluginInterface[] |
|
91
|
|
|
*/ |
|
92
|
|
|
protected function getRouteProvider(): array |
|
93
|
|
|
{ |
|
94
|
|
|
return [ |
|
95
|
|
|
new ErrorPageRouteProviderPlugin(), |
|
96
|
|
|
new HomePageRouteProviderPlugin(), |
|
97
|
|
|
new CheckoutPageRouteProviderPlugin(), |
|
98
|
|
|
new CustomerPageRouteProviderPlugin(), |
|
99
|
|
|
new CustomerReorderWidgetRouteProviderPlugin(), |
|
100
|
|
|
new NewsletterPageRouteProviderPlugin(), |
|
101
|
|
|
new CartPageRouteProviderPlugin(), |
|
102
|
|
|
new HealthCheckRouteProviderPlugin(), |
|
103
|
|
|
new NewsletterWidgetRouteProviderPlugin(), |
|
104
|
|
|
new CatalogPageRouteProviderPlugin(), |
|
105
|
|
|
new CalculationPageRouteProviderPlugin(), |
|
106
|
|
|
new ProductSetListPageRouteProviderPlugin(), |
|
107
|
|
|
new ExampleProductSaleRouteProviderPlugin(), |
|
108
|
|
|
new CmsPageRouteProviderPlugin(), |
|
109
|
|
|
new CurrencyWidgetRouteProviderPlugin(), |
|
110
|
|
|
new ProductNewPageRouteProviderPlugin(), |
|
111
|
|
|
new ProductReviewWidgetRouteProviderPlugin(), |
|
112
|
|
|
new DiscountWidgetRouteProviderPlugin(), |
|
113
|
|
|
new PriceWidgetRouteProviderPlugin(), |
|
114
|
|
|
new CartCodeWidgetRouteProviderPlugin(), |
|
115
|
|
|
new CartNoteWidgetRouteProviderPlugin(), #CartNoteFeature |
|
116
|
|
|
new QuickOrderPageRouteProviderPlugin(), |
|
117
|
|
|
new CompanyPageRouteProviderPlugin(), |
|
118
|
|
|
new MultiCartPageRouteProviderPlugin(), #MultiCartFeature |
|
119
|
|
|
new SharedCartPageRouteProviderPlugin(), #SharedCartFeature |
|
120
|
|
|
new ShoppingListPageRouteProviderPlugin(), #ShoppingListFeature |
|
121
|
|
|
new ShoppingListWidgetRouteProviderPlugin(), #ShoppingListFeature |
|
122
|
|
|
new CompanyUserInvitationPageRouteProviderPlugin(), #BulkImportCompanyUserInvitationsFeature |
|
123
|
|
|
new AgentPageRouteProviderPlugin(), #AgentFeature |
|
124
|
|
|
new AgentWidgetRouteProviderPlugin(), #AgentFeature |
|
125
|
|
|
new FileManagerWidgetRouteProviderPlugin(), |
|
126
|
|
|
new CmsSearchPageRouteProviderPlugin(), #CmsSearchPageFeature |
|
127
|
|
|
new ProductSearchWidgetRouteProviderPlugin(), |
|
128
|
|
|
new AvailabilityNotificationWidgetRouteProviderPlugin(), |
|
129
|
|
|
new AvailabilityNotificationPageRouteProviderPlugin(), |
|
130
|
|
|
new QuoteApprovalWidgetRouteProviderPlugin(), #QuoteApprovalFeature |
|
131
|
|
|
new QuoteRequestAgentPageRouteProviderPlugin(), |
|
132
|
|
|
new QuoteRequestAgentWidgetRouteProviderPlugin(), |
|
133
|
|
|
new QuoteRequestPageRouteProviderPlugin(), |
|
134
|
|
|
new QuoteRequestWidgetRouteProviderPlugin(), |
|
135
|
|
|
new PersistentCartSharePageRouteProviderPlugin(), |
|
136
|
|
|
new PersistentCartShareWidgetRouteProviderPlugin(), |
|
137
|
|
|
new ResourceSharePageRouteProviderPlugin(), |
|
138
|
|
|
new CommentWidgetRouteProviderPlugin(), |
|
139
|
|
|
new CompanyUserAgentWidgetRouteProviderPlugin(), |
|
140
|
|
|
new ConfigurableBundleWidgetRouteProviderPlugin(), |
|
141
|
|
|
new ConfigurableBundlePageRouteProviderPlugin(), |
|
142
|
|
|
new ConfigurableBundleNoteWidgetRouteProviderPlugin(), |
|
143
|
|
|
new OrderCustomReferenceWidgetRouteProviderPlugin(), |
|
144
|
|
|
new MerchantProductOfferWidgetRouteProviderPlugin(), |
|
145
|
|
|
new SalesReturnPageRouteProviderPlugin(), |
|
146
|
|
|
new OrderCancelWidgetRouteProviderPlugin(), |
|
147
|
|
|
new PaymentPageRouteProviderPlugin(), |
|
148
|
|
|
new ProductConfiguratorGatewayPageRouteProviderPlugin(), |
|
149
|
|
|
]; |
|
150
|
|
|
} |
|
151
|
|
|
|
|
152
|
|
|
/** |
|
153
|
|
|
* @return \Spryker\Yves\RouterExtension\Dependency\Plugin\PostAddRouteManipulatorPluginInterface[] |
|
154
|
|
|
*/ |
|
155
|
|
|
protected function getPostAddRouteManipulator(): array |
|
156
|
|
|
{ |
|
157
|
|
|
return [ |
|
158
|
|
|
new LanguageDefaultPostAddRouteManipulatorPlugin(), |
|
159
|
|
|
new StoreDefaultPostAddRouteManipulatorPlugin(), |
|
160
|
|
|
new SslPostAddRouteManipulatorPlugin(), |
|
161
|
|
|
]; |
|
162
|
|
|
} |
|
163
|
|
|
|
|
164
|
|
|
/** |
|
165
|
|
|
* @return \Spryker\Yves\RouterExtension\Dependency\Plugin\RouterEnhancerPluginInterface[] |
|
166
|
|
|
*/ |
|
167
|
|
|
protected function getRouterEnhancerPlugins(): array |
|
168
|
|
|
{ |
|
169
|
|
|
return [ |
|
170
|
|
|
new LanguagePrefixRouterEnhancerPlugin(), |
|
171
|
|
|
new StorePrefixRouterEnhancerPlugin(), |
|
172
|
|
|
]; |
|
173
|
|
|
} |
|
174
|
|
|
} |
|
175
|
|
|
|