Failed Conditions
Push — master ( 999028...ace778 )
by
unknown
37:54
created

createFileAttachmentMapper()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerFeature\Zed\SelfServicePortal\Communication;
9
10
use Generated\Shared\Transfer\FileAttachmentFileTableCriteriaTransfer;
11
use Generated\Shared\Transfer\FileAttachmentFileViewDetailTableCriteriaTransfer;
12
use Generated\Shared\Transfer\ItemTransfer;
13
use Generated\Shared\Transfer\OrderTransfer;
14
use Generated\Shared\Transfer\ProductConcreteTransfer;
15
use Generated\Shared\Transfer\ProductOfferTransfer;
16
use Generated\Shared\Transfer\SspAssetConditionsTransfer;
17
use Generated\Shared\Transfer\SspAssetTransfer;
18
use Generated\Shared\Transfer\SspInquiryConditionsTransfer;
19
use Orm\Zed\FileManager\Persistence\SpyFileInfoQuery;
20
use Orm\Zed\FileManager\Persistence\SpyFileQuery;
21
use Orm\Zed\Product\Persistence\SpyProductQuery;
22
use Orm\Zed\ProductImage\Persistence\SpyProductImageQuery;
23
use Orm\Zed\Sales\Persistence\SpySalesOrderItemQuery;
24
use Orm\Zed\SelfServicePortal\Persistence\SpySspAssetQuery;
25
use Orm\Zed\SelfServicePortal\Persistence\SpySspAssetToCompanyBusinessUnitQuery;
26
use Orm\Zed\SelfServicePortal\Persistence\SpySspInquiryQuery;
27
use Orm\Zed\SelfServicePortal\Persistence\SpySspInquirySspAssetQuery;
28
use Spryker\Service\FileManager\FileManagerServiceInterface;
29
use Spryker\Service\UtilDateTime\UtilDateTimeServiceInterface;
30
use Spryker\Zed\Company\Business\CompanyFacadeInterface;
31
use Spryker\Zed\CompanyBusinessUnit\Business\CompanyBusinessUnitFacadeInterface;
32
use Spryker\Zed\CompanyUser\Business\CompanyUserFacadeInterface;
33
use Spryker\Zed\Customer\Business\CustomerFacadeInterface;
34
use Spryker\Zed\FileManager\Business\FileManagerFacadeInterface;
35
use Spryker\Zed\Kernel\Communication\AbstractCommunicationFactory;
36
use Spryker\Zed\Locale\Business\LocaleFacade;
37
use Spryker\Zed\Mail\Business\MailFacadeInterface;
38
use Spryker\Zed\Merchant\Business\MerchantFacadeInterface;
39
use Spryker\Zed\MerchantStock\Business\MerchantStockFacadeInterface;
40
use Spryker\Zed\Oms\Business\OmsFacadeInterface;
41
use Spryker\Zed\Product\Business\ProductFacadeInterface;
42
use Spryker\Zed\ProductOffer\Business\ProductOfferFacadeInterface;
43
use Spryker\Zed\Sales\Business\SalesFacadeInterface;
44
use Spryker\Zed\SequenceNumber\Business\SequenceNumberFacadeInterface;
45
use Spryker\Zed\ServicePoint\Business\ServicePointFacadeInterface;
46
use Spryker\Zed\ShipmentType\Business\ShipmentTypeFacadeInterface;
47
use Spryker\Zed\StateMachine\Business\StateMachineFacadeInterface;
48
use Spryker\Zed\Store\Business\StoreFacadeInterface;
49
use Spryker\Zed\Translator\Business\TranslatorFacadeInterface;
50
use SprykerFeature\Zed\SelfServicePortal\Business\Asset\Expander\SspAssetItemExpander;
51
use SprykerFeature\Zed\SelfServicePortal\Business\Asset\Expander\SspAssetItemExpanderInterface;
52
use SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\OrderItemProductTypeExpander;
53
use SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\OrderItemProductTypeExpanderInterface;
54
use SprykerFeature\Zed\SelfServicePortal\Business\Service\Saver\ServiceDateTimeEnabledSaver;
55
use SprykerFeature\Zed\SelfServicePortal\Business\Service\Saver\ServiceDateTimeEnabledSaverInterface;
56
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Expander\OrderItemSspAssetExpander;
57
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Expander\OrderItemSspAssetExpanderInterface;
58
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Extractor\SalesOrderItemIdExtractor;
59
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Extractor\SalesOrderItemIdExtractorInterface;
60
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Form\DataProvider\SspAssetFilterFormDataProvider;
61
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Form\DataProvider\SspAssetFormDataProvider;
62
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Form\SspAssetFilterForm;
63
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Form\SspAssetForm;
64
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Mapper\SspAssetFormDataToTransferMapper;
65
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Mapper\SspAssetFormDataToTransferMapperInterface;
66
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Saver\SalesOrderItemSspAssetSaver;
67
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Saver\SalesOrderItemSspAssetSaverInterface;
68
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Table\AssignedBusinessUnitTable;
69
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Table\SspAssetTable;
70
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Table\SspInquiryTable as AssetSspInquiryTable;
71
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Table\SspServiceTable;
72
use SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Tabs\SspAssetTabs;
73
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\AttachFileForm;
74
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\DataProvider\AssetAttachmentFormDataProvider;
75
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\DataProvider\FileAttachFormDataProvider;
76
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\DataProvider\FileTableFilterFormDataProvider;
77
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\DataProvider\ViewFileDetailTableFilterFormDataProvider;
78
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\DeleteFileForm;
79
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\FileTableFilterForm;
80
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\SspAssetAttachmentForm;
81
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\UnlinkFileForm;
82
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\UploadFileForm;
83
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\ViewFileDetailTableFilterForm;
84
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Formatter\FileSizeFormatter;
85
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Formatter\FileSizeFormatterInterface;
86
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Formatter\TimeZoneFormatter;
87
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Formatter\TimeZoneFormatterInterface;
88
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Mapper\FileAttachmentMapper;
89
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Mapper\FileAttachmentMapperInterface;
90
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Mapper\FileUploadMapper;
91
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Mapper\FileUploadMapperInterface;
92
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Reader\FileReader;
93
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Reader\FileReaderInterface;
94
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\ReferenceGenerator\FileReferenceGenerator;
95
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\ReferenceGenerator\FileReferenceGeneratorInterface;
96
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Saver\FileSaver;
97
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Saver\FileSaverInterface;
98
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Table\AttachedSspAssetFileTable;
99
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Table\FileTable;
100
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Table\ViewFileDetailTable;
101
use SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Tabs\FileAttachmentTabs;
102
use SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Form\DataProvider\SspInquiryFilterFormDataProvider;
103
use SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Form\DataProvider\SspInquiryFilterFormDataProviderInterface;
104
use SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Form\DataProvider\TriggerEventFormDataProvider;
105
use SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Form\DataProvider\TriggerEventFormDataProviderInterface;
106
use SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Form\SspInquiryFilterForm;
107
use SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Form\TriggerEventForm;
108
use SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Table\OrderSspInquiryTable;
109
use SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Table\SspInquiryTable;
110
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Expander\ProductAbstractTypeExpander;
111
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Expander\ProductAbstractTypeExpanderInterface;
112
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Expander\ProductOfferTableActionExpander;
113
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Expander\ProductOfferTableActionExpanderInterface;
114
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\CreateOfferForm;
115
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\CreateOfferFormDataProvider;
116
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\EditOfferFormDataProvider;
117
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\ItemSchedulerFormDataProvider;
118
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\ServiceDateTimeEnabledProductConcreteFormDataProvider;
119
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\ShipmentTypeProductConcreteFormDataProvider;
120
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\ServicePointServicesDataTransformer;
121
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\ShipmentTypesDataTransformer;
122
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\StoresDataTransformer;
123
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\ValidFromDataTransformer;
124
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\ValidToDataTransformer;
125
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\EditOfferForm;
126
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\EventListener\MerchantCreateOfferFormEventSubscriber;
127
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\EventListener\ServicePointEditOfferFormEventSubscriber;
128
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\EventListener\StockCreateOfferFormEventSubscriber;
129
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\EventListener\StockEditOfferFormEventSubscriber;
130
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\Expander\ServiceDateTimeEnabledProductConcreteFormExpander;
131
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\Expander\ServiceDateTimeEnabledProductConcreteFormExpanderInterface;
132
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\Expander\ShipmentTypeProductConcreteFormExpander;
133
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\Expander\ShipmentTypeProductConcreteFormExpanderInterface;
134
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\ItemSchedulerForm;
135
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\ProductAbstractTypeForm;
136
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\ServiceDateTimeEnabledProductConcreteForm;
137
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\ShipmentTypeProductConcreteForm;
138
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Mapper\ProductAbstractTypeProductFormMapper;
139
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Mapper\ProductAbstractTypeProductFormMapperInterface;
140
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Mapper\ServiceDateTimeProductFormMapper;
141
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Mapper\ServiceDateTimeProductFormMapperInterface;
142
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Mapper\ShipmentTypeProductFormMapper;
143
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Mapper\ShipmentTypeProductFormMapperInterface;
144
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Reader\ProductReader;
145
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Reader\ProductReaderInterface;
146
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Reader\SalesOrderItemReader;
147
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Reader\SalesOrderItemReaderInterface;
148
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Reader\ShipmentTypeReader;
149
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Reader\ShipmentTypeReaderInterface;
150
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Saver\SalesOrderItemProductTypesSaver;
151
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Saver\SalesOrderItemProductTypesSaverInterface;
152
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Table\ProductConcreteTable;
153
use SprykerFeature\Zed\SelfServicePortal\Communication\Service\Table\ServiceTable;
154
use SprykerFeature\Zed\SelfServicePortal\SelfServicePortalDependencyProvider;
155
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
156
use Symfony\Component\Form\FormInterface;
157
use Symfony\Component\Form\FormTypeInterface;
158
159
/**
160
 * @method \SprykerFeature\Zed\SelfServicePortal\SelfServicePortalConfig getConfig()
161
 * @method \SprykerFeature\Zed\SelfServicePortal\Business\SelfServicePortalFacadeInterface getFacade()
162
 * @method \SprykerFeature\Zed\SelfServicePortal\Persistence\SelfServicePortalEntityManagerInterface getEntityManager()
163
 * @method \SprykerFeature\Zed\SelfServicePortal\Persistence\SelfServicePortalRepositoryInterface getRepository()
164
 */
165
class SelfServicePortalCommunicationFactory extends AbstractCommunicationFactory
166
{
167
    /**
168
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\ShipmentTypeProductConcreteFormDataProvider
169
     */
170
    public function createShipmentTypeProductConcreteFormDataProvider(): ShipmentTypeProductConcreteFormDataProvider
171
    {
172
        return new ShipmentTypeProductConcreteFormDataProvider($this->getShipmentTypeFacade());
173
    }
174
175
    /**
176
     * @return \Symfony\Component\Form\FormTypeInterface
177
     */
178
    public function createShipmentTypeProductConcreteForm(): FormTypeInterface
179
    {
180
        return new ShipmentTypeProductConcreteForm();
181
    }
182
183
    /**
184
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\ServiceDateTimeEnabledProductConcreteFormDataProvider
185
     */
186
    public function createServiceDateTimeEnabledProductConcreteFormDataProvider(): ServiceDateTimeEnabledProductConcreteFormDataProvider
187
    {
188
        return new ServiceDateTimeEnabledProductConcreteFormDataProvider();
189
    }
190
191
    /**
192
     * @return \Symfony\Component\Form\FormTypeInterface
193
     */
194
    public function createServiceDateTimeEnabledProductConcreteForm(): FormTypeInterface
195
    {
196
        return new ServiceDateTimeEnabledProductConcreteForm();
197
    }
198
199
    /**
200
     * @param \Generated\Shared\Transfer\ProductConcreteTransfer $productConcreteTransfer
201
     *
202
     * @return \Symfony\Component\Form\FormInterface
203
     */
204
    public function createCreateOfferForm(ProductConcreteTransfer $productConcreteTransfer): FormInterface
205
    {
206
        return $this->getFormFactory()->create(
207
            CreateOfferForm::class,
208
            $this->createCreateOfferFormDataProvider()->getData($productConcreteTransfer),
209
            $this->createCreateOfferFormDataProvider()->getOptions(),
210
        );
211
    }
212
213
    /**
214
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\CreateOfferFormDataProvider
215
     */
216
    public function createCreateOfferFormDataProvider(): CreateOfferFormDataProvider
217
    {
218
        return new CreateOfferFormDataProvider(
219
            $this->getStoreFacade(),
220
            $this->getShipmentTypeFacade(),
221
            $this->getServicePointFacade(),
222
            $this->getCreateProductOfferFormModelTransformers(),
223
            $this->getCreateProductOfferFormEventSubscribers(),
224
        );
225
    }
226
227
    /**
228
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Reader\ProductReaderInterface
229
     */
230
    public function createProductReader(): ProductReaderInterface
231
    {
232
        return new ProductReader(
233
            $this->getProductFacade(),
234
            $this->getLocaleFacade(),
235
        );
236
    }
237
238
    /**
239
     * @return \Symfony\Component\Form\FormTypeInterface
240
     */
241
    public function createProductAbstractTypeForm(): FormTypeInterface
242
    {
243
        return new ProductAbstractTypeForm();
244
    }
245
246
    /**
247
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Mapper\ShipmentTypeProductFormMapperInterface
248
     */
249
    public function createShipmentTypeProductFormMapper(): ShipmentTypeProductFormMapperInterface
250
    {
251
        return new ShipmentTypeProductFormMapper();
252
    }
253
254
    /**
255
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Mapper\ServiceDateTimeProductFormMapperInterface
256
     */
257
    public function createServiceDateTimeProductFormMapper(): ServiceDateTimeProductFormMapperInterface
258
    {
259
        return new ServiceDateTimeProductFormMapper();
260
    }
261
262
    /**
263
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Reader\ShipmentTypeReaderInterface
264
     */
265
    public function createShipmentTypeReader(): ShipmentTypeReaderInterface
266
    {
267
        return new ShipmentTypeReader($this->getShipmentTypeFacade(), $this->getConfig());
268
    }
269
270
    /**
271
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Table\ProductConcreteTable
272
     */
273
    public function createProductConcreteTable(): ProductConcreteTable
274
    {
275
        return new ProductConcreteTable(
276
            $this->getProductQuery(),
277
            $this->getProductImageQuery(),
278
            $this->getLocaleFacade(),
279
        );
280
    }
281
282
    /**
283
     * @return array<string, \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\DataTransformerInterface<mixed, mixed>>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<string, \SprykerFe...nterface<mixed, mixed>> at position 4 could not be parsed: Expected '>' at position 4, but found '\SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\DataTransformerInterface'.
Loading history...
284
     */
285
    public function getCreateProductOfferFormModelTransformers(): array
286
    {
287
        return [
288
            CreateOfferForm::FIELD_STORES => $this->createStoresDataTransformer(),
289
            CreateOfferForm::FIELD_SHIPMENT_TYPES => $this->createShipmentTypesDataTransformer(),
290
            CreateOfferForm::FIELD_SERVICE_POINT_SERVICES => $this->createServicePointServicesDataTransformer(),
291
        ];
292
    }
293
294
    /**
295
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\StoresDataTransformer
296
     */
297
    public function createStoresDataTransformer(): StoresDataTransformer
298
    {
299
        return new StoresDataTransformer();
300
    }
301
302
    /**
303
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\ShipmentTypesDataTransformer
304
     */
305
    public function createShipmentTypesDataTransformer(): ShipmentTypesDataTransformer
306
    {
307
        return new ShipmentTypesDataTransformer();
308
    }
309
310
    /**
311
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\ServicePointServicesDataTransformer
312
     */
313
    public function createServicePointServicesDataTransformer(): ServicePointServicesDataTransformer
314
    {
315
        return new ServicePointServicesDataTransformer();
316
    }
317
318
    /**
319
     * @return \Symfony\Component\EventDispatcher\EventSubscriberInterface
320
     */
321
    public function createStockCreateOfferFormEventSubscriber(): EventSubscriberInterface
322
    {
323
        return new StockCreateOfferFormEventSubscriber();
324
    }
325
326
    /**
327
     * @return \Symfony\Component\EventDispatcher\EventSubscriberInterface
328
     */
329
    public function createMerchantCreateOfferFormEventSubscriber(): EventSubscriberInterface
330
    {
331
        return new MerchantCreateOfferFormEventSubscriber(
332
            $this->getMerchantFacade(),
333
            $this->getMerchantStockFacade(),
334
            $this->getConfig(),
335
        );
336
    }
337
338
    /**
339
     * @return list<\Symfony\Component\EventDispatcher\EventSubscriberInterface>
340
     */
341
    public function getCreateProductOfferFormEventSubscribers(): array
342
    {
343
        return [
344
            $this->createStockCreateOfferFormEventSubscriber(),
345
            $this->createMerchantCreateOfferFormEventSubscriber(),
346
        ];
347
    }
348
349
    /**
350
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Table\ServiceTable
351
     */
352
    public function createServiceTable(): ServiceTable
353
    {
354
        return new ServiceTable(
355
            $this->getSalesOrderItemPropelQuery(),
356
            $this->getDateTimeService(),
357
            $this->getConfig(),
358
        );
359
    }
360
361
    /**
362
     * @param \Generated\Shared\Transfer\ItemTransfer $itemTransfer
363
     *
364
     * @return \Symfony\Component\Form\FormInterface
365
     */
366
    public function createItemSchedulerForm(ItemTransfer $itemTransfer): FormInterface
367
    {
368
        $itemSchedulerFormDataProvider = $this->createItemSchedulerFormDataProvider();
369
370
        return $this->getFormFactory()->create(
371
            ItemSchedulerForm::class,
372
            $itemSchedulerFormDataProvider->getData($itemTransfer),
373
            $itemSchedulerFormDataProvider->getOptions(),
374
        );
375
    }
376
377
    /**
378
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\ItemSchedulerFormDataProvider
379
     */
380
    public function createItemSchedulerFormDataProvider(): ItemSchedulerFormDataProvider
381
    {
382
        return new ItemSchedulerFormDataProvider();
383
    }
384
385
    /**
386
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Reader\SalesOrderItemReaderInterface
387
     */
388
    public function createSalesOrderItemReader(): SalesOrderItemReaderInterface
389
    {
390
        return new SalesOrderItemReader($this->getSalesFacade());
391
    }
392
393
    /**
394
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Expander\ProductAbstractTypeExpanderInterface
395
     */
396
    public function createProductAbstractTypeExpander(): ProductAbstractTypeExpanderInterface
397
    {
398
        return new ProductAbstractTypeExpander(
399
            $this->getRepository(),
400
        );
401
    }
402
403
    /**
404
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Saver\SalesOrderItemProductTypesSaverInterface
405
     */
406
    public function createSalesOrderItemProductTypesSaver(): SalesOrderItemProductTypesSaverInterface
407
    {
408
        return new SalesOrderItemProductTypesSaver(
409
            $this->getEntityManager(),
410
        );
411
    }
412
413
    /**
414
     * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Saver\ServiceDateTimeEnabledSaverInterface
415
     */
416
    public function createServiceDateTimeEnabledSaver(): ServiceDateTimeEnabledSaverInterface
417
    {
418
        return new ServiceDateTimeEnabledSaver(
419
            $this->getEntityManager(),
420
        );
421
    }
422
423
    /**
424
     * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\OrderItemProductTypeExpanderInterface
425
     */
426
    public function createOrderItemProductTypeExpander(): OrderItemProductTypeExpanderInterface
427
    {
428
        return new OrderItemProductTypeExpander(
429
            $this->getRepository(),
430
        );
431
    }
432
433
    /**
434
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Tabs\FileAttachmentTabs
435
     */
436
    public function createFileAttachmentTabs(): FileAttachmentTabs
437
    {
438
        return new FileAttachmentTabs();
439
    }
440
441
    /**
442
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\DataProvider\AssetAttachmentFormDataProvider
443
     */
444
    public function createAssetAttachmentFormDataProvider(): AssetAttachmentFormDataProvider
445
    {
446
        return new AssetAttachmentFormDataProvider($this->getFacade());
447
    }
448
449
    /**
450
     * @param \Generated\Shared\Transfer\SspAssetTransfer $sspAssetTransfer
451
     *
452
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Table\AttachedSspAssetFileTable
453
     */
454
    public function createAttachedSspAssetFileTable(SspAssetTransfer $sspAssetTransfer): AttachedSspAssetFileTable
455
    {
456
        return new AttachedSspAssetFileTable(
457
            $sspAssetTransfer,
458
            $this->getFilePropelQuery(),
459
            $this->getUtilDateTimeService(),
460
        );
461
    }
462
463
    /**
464
     * @param \Generated\Shared\Transfer\FileAttachmentFileTableCriteriaTransfer $fileAttachmentFileTableCriteriaTransfer
465
     *
466
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Table\FileTable
467
     */
468
    public function createFileTable(
469
        FileAttachmentFileTableCriteriaTransfer $fileAttachmentFileTableCriteriaTransfer
470
    ): FileTable {
471
        return new FileTable(
472
            $this->getFilePropelQuery(),
473
            $this->createFileSizeFormatter(),
474
            $this->getDateTimeService(),
475
            $this->createTimeZoneFormatter(),
476
            $fileAttachmentFileTableCriteriaTransfer,
477
        );
478
    }
479
480
    /**
481
     * @param int $idFile
482
     * @param \Generated\Shared\Transfer\FileAttachmentFileViewDetailTableCriteriaTransfer $fileAttachmentFileViewDetailTableCriteriaTransfer
483
     *
484
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Table\ViewFileDetailTable
485
     */
486
    public function createViewFileDetailTable(
487
        int $idFile,
488
        FileAttachmentFileViewDetailTableCriteriaTransfer $fileAttachmentFileViewDetailTableCriteriaTransfer
489
    ): ViewFileDetailTable {
490
        return new ViewFileDetailTable(
491
            $this->getFilePropelQuery(),
492
            $idFile,
493
            $this->getDateTimeService(),
494
            $this->createTimeZoneFormatter(),
495
            $fileAttachmentFileViewDetailTableCriteriaTransfer,
496
        );
497
    }
498
499
    /**
500
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Formatter\FileSizeFormatterInterface
501
     */
502
    public function createFileSizeFormatter(): FileSizeFormatterInterface
503
    {
504
        return new FileSizeFormatter();
505
    }
506
507
    /**
508
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Mapper\FileUploadMapperInterface
509
     */
510
    public function createFileUploadMapper(): FileUploadMapperInterface
511
    {
512
        return new FileUploadMapper($this->getConfig());
513
    }
514
515
    /**
516
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Saver\FileSaverInterface
517
     */
518
    public function createFileSaver(): FileSaverInterface
519
    {
520
        return new FileSaver(
521
            $this->createFileUploadMapper(),
522
            $this->getFileManagerFacade(),
523
            $this->createFileReferenceGenerator(),
524
        );
525
    }
526
527
    /**
528
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\ReferenceGenerator\FileReferenceGeneratorInterface
529
     */
530
    public function createFileReferenceGenerator(): FileReferenceGeneratorInterface
531
    {
532
        return new FileReferenceGenerator(
533
            $this->getSequenceNumberFacade(),
534
            $this->getConfig(),
535
        );
536
    }
537
538
    /**
539
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Reader\FileReaderInterface
540
     */
541
    public function createFileReader(): FileReaderInterface
542
    {
543
        return new FileReader($this->getFileManagerFacade());
544
    }
545
546
    /**
547
     * @return \Symfony\Component\Form\FormInterface
548
     */
549
    public function createUploadFileForm(): FormInterface
550
    {
551
        return $this->getFormFactory()->create(UploadFileForm::class);
552
    }
553
554
    /**
555
     * @return \Symfony\Component\Form\FormInterface
556
     */
557
    public function createUnlinkFileForm(): FormInterface
558
    {
559
        return $this->getFormFactory()->create(UnlinkFileForm::class);
560
    }
561
562
    /**
563
     * @return \Symfony\Component\Form\FormInterface
564
     */
565
    public function createDeleteFileForm(): FormInterface
566
    {
567
        return $this->getFormFactory()->create(DeleteFileForm::class);
568
    }
569
570
    /**
571
     * @param \Generated\Shared\Transfer\FileAttachmentFileTableCriteriaTransfer $fileAttachmentFileTableCriteriaTransfer
572
     *
573
     * @return \Symfony\Component\Form\FormInterface
574
     */
575
    public function createFileTableFilterForm(
576
        FileAttachmentFileTableCriteriaTransfer $fileAttachmentFileTableCriteriaTransfer
577
    ): FormInterface {
578
        $dataProvider = $this->createFileTableFilterFormDataProvider();
579
580
        return $this->getFormFactory()->create(
581
            FileTableFilterForm::class,
582
            $fileAttachmentFileTableCriteriaTransfer,
583
            $dataProvider->getOptions(),
584
        );
585
    }
586
587
    /**
588
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\DataProvider\FileTableFilterFormDataProvider
589
     */
590
    public function createFileTableFilterFormDataProvider(): FileTableFilterFormDataProvider
591
    {
592
        return new FileTableFilterFormDataProvider(
593
            $this->getConfig(),
594
        );
595
    }
596
597
    /**
598
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\DataProvider\ViewFileDetailTableFilterFormDataProvider
599
     */
600
    public function createViewFileDetailTableFilterFormDataProvider(): ViewFileDetailTableFilterFormDataProvider
601
    {
602
        return new ViewFileDetailTableFilterFormDataProvider(
603
            $this->getConfig(),
604
            $this->getTranslatorFacade(),
605
        );
606
    }
607
608
    /**
609
     * @param \Generated\Shared\Transfer\FileAttachmentFileViewDetailTableCriteriaTransfer $fileAttachmentFileViewDetailTableCriteriaTransfer
610
     *
611
     * @return \Symfony\Component\Form\FormInterface
612
     */
613
    public function createViewFileDetailTableFilterForm(
614
        FileAttachmentFileViewDetailTableCriteriaTransfer $fileAttachmentFileViewDetailTableCriteriaTransfer
615
    ): FormInterface {
616
        $dataProvider = $this->createViewFileDetailTableFilterFormDataProvider();
617
618
        return $this->getFormFactory()->create(
619
            ViewFileDetailTableFilterForm::class,
620
            $fileAttachmentFileViewDetailTableCriteriaTransfer,
621
            $dataProvider->getOptions(),
622
        );
623
    }
624
625
    /**
626
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Form\DataProvider\FileAttachFormDataProvider
627
     */
628
    public function createFileAttachFormDataProvider(): FileAttachFormDataProvider
629
    {
630
        return new FileAttachFormDataProvider(
631
            $this->getCompanyFacade(),
632
            $this->getCompanyUserFacade(),
633
            $this->getCompanyBusinessUnitFacade(),
634
            $this->getConfig(),
635
        );
636
    }
637
638
    /**
639
     * @param array<mixed>|null $data
640
     * @param array<mixed> $options
641
     *
642
     * @return \Symfony\Component\Form\FormInterface
643
     */
644
    public function createAttachFileForm(?array $data = null, array $options = []): FormInterface
645
    {
646
        return $this->getFormFactory()
647
            ->create(AttachFileForm::class, $data, $options);
648
    }
649
650
    /**
651
     * @param array<mixed>|null $data
652
     * @param array<mixed> $options
653
     *
654
     * @return \Symfony\Component\Form\FormInterface
655
     */
656
    public function createSspAssetAttachmentForm(?array $data = null, array $options = []): FormInterface
657
    {
658
        return $this->getFormFactory()
659
            ->create(SspAssetAttachmentForm::class, $data, $options);
660
    }
661
662
    /**
663
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Mapper\FileAttachmentMapperInterface
664
     */
665
    public function createFileAttachmentMapper(): FileAttachmentMapperInterface
666
    {
667
        return new FileAttachmentMapper();
668
    }
669
670
    /**
671
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Form\DataProvider\TriggerEventFormDataProviderInterface
672
     */
673
    public function createTriggerEventFormDataProvider(): TriggerEventFormDataProviderInterface
674
    {
675
        return new TriggerEventFormDataProvider(
676
            $this->getFacade(),
677
            $this->getStateMachineFacade(),
678
            $this->getConfig(),
679
        );
680
    }
681
682
    /**
683
     * @param array<mixed> $data
684
     * @param array<mixed> $options
685
     *
686
     * @return \Symfony\Component\Form\FormInterface
687
     */
688
    public function getTriggerEventForm(array $data, array $options): FormInterface
689
    {
690
        return $this->getFormFactory()->create(TriggerEventForm::class, $data, $options);
691
    }
692
693
    /**
694
     * @param \Generated\Shared\Transfer\SspInquiryConditionsTransfer $sspInquiryConditionsTransfer
695
     *
696
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Table\SspInquiryTable
697
     */
698
    public function createSspInquiryTable(SspInquiryConditionsTransfer $sspInquiryConditionsTransfer): SspInquiryTable
699
    {
700
        return new SspInquiryTable(
701
            $this->getSspInquiryQuery(),
702
            $this->getConfig(),
703
            $this->getUtilDateTimeService(),
704
            $sspInquiryConditionsTransfer,
705
        );
706
    }
707
708
    /**
709
     * @param \Generated\Shared\Transfer\SspInquiryConditionsTransfer $sspInquiryConditionsTransfer
710
     *
711
     * @return \Symfony\Component\Form\FormInterface
712
     */
713
    public function getSspInquiryFilterForm(SspInquiryConditionsTransfer $sspInquiryConditionsTransfer): FormInterface
714
    {
715
        return $this->getFormFactory()->create(SspInquiryFilterForm::class, $sspInquiryConditionsTransfer, $this->createSspInquiryFilterFormDataProvider()->getOptions());
716
    }
717
718
    /**
719
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Form\DataProvider\SspInquiryFilterFormDataProviderInterface
720
     */
721
    public function createSspInquiryFilterFormDataProvider(): SspInquiryFilterFormDataProviderInterface
722
    {
723
        return new SspInquiryFilterFormDataProvider(
724
            $this->getConfig(),
725
        );
726
    }
727
728
    /**
729
     * @param \Generated\Shared\Transfer\OrderTransfer $orderTransfer
730
     *
731
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Inquiry\Table\OrderSspInquiryTable
732
     */
733
    public function createOrderSspInquiryTable(OrderTransfer $orderTransfer): OrderSspInquiryTable
734
    {
735
        return new OrderSspInquiryTable(
736
            $this->getSspInquiryQuery(),
737
            $this->getConfig(),
738
            $orderTransfer,
739
        );
740
    }
741
742
    /**
743
     * @return \Orm\Zed\SelfServicePortal\Persistence\SpySspInquiryQuery
744
     */
745
    public function getSspInquiryQuery(): SpySspInquiryQuery
746
    {
747
        return SpySspInquiryQuery::create();
748
    }
749
750
    /**
751
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\CompanyFile\Formatter\TimeZoneFormatterInterface
752
     */
753
    public function createTimeZoneFormatter(): TimeZoneFormatterInterface
754
    {
755
        return new TimeZoneFormatter($this->getConfig());
756
    }
757
758
    /**
759
     * @param \Generated\Shared\Transfer\ProductOfferTransfer $productOfferTransfer
760
     *
761
     * @return \Symfony\Component\Form\FormInterface
762
     */
763
    public function createEditOfferForm(ProductOfferTransfer $productOfferTransfer): FormInterface
764
    {
765
        return $this->getFormFactory()->create(
766
            EditOfferForm::class,
767
            $this->createEditOfferFormDataProvider()->getData($productOfferTransfer),
768
            $this->createEditOfferFormDataProvider()->getOptions($productOfferTransfer),
769
        );
770
    }
771
772
    /**
773
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataProvider\EditOfferFormDataProvider
774
     */
775
    public function createEditOfferFormDataProvider(): EditOfferFormDataProvider
776
    {
777
        return new EditOfferFormDataProvider(
778
            $this->getStoreFacade(),
779
            $this->getShipmentTypeFacade(),
780
            $this->getServicePointFacade(),
781
            $this->getEditProductOfferFormModelTransformers(),
782
            $this->getEditProductOfferFormEventSubscribers(),
783
        );
784
    }
785
786
    /**
787
     * @return array<string, \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\DataTransformerInterface<mixed, mixed>>
0 ignored issues
show
Documentation Bug introduced by
The doc comment array<string, \SprykerFe...nterface<mixed, mixed>> at position 4 could not be parsed: Expected '>' at position 4, but found '\SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\DataTransformerInterface'.
Loading history...
788
     */
789
    public function getEditProductOfferFormModelTransformers(): array
790
    {
791
        return [
792
            CreateOfferForm::FIELD_STORES => $this->createStoresDataTransformer(),
793
            CreateOfferForm::FIELD_SHIPMENT_TYPES => $this->createShipmentTypesDataTransformer(),
794
            CreateOfferForm::FIELD_VALID_FROM => $this->createValidFromDataTransformer(),
795
            CreateOfferForm::FIELD_VALID_TO => $this->createValidToDataTransformer(),
796
        ];
797
    }
798
799
    /**
800
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\ValidFromDataTransformer
801
     */
802
    public function createValidFromDataTransformer(): ValidFromDataTransformer
803
    {
804
        return new ValidFromDataTransformer();
805
    }
806
807
    /**
808
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\DataTransformer\ValidToDataTransformer
809
     */
810
    public function createValidToDataTransformer(): ValidToDataTransformer
811
    {
812
        return new ValidToDataTransformer();
813
    }
814
815
    /**
816
     * @return \Symfony\Component\EventDispatcher\EventSubscriberInterface
817
     */
818
    public function createStockEditOfferFormEventSubscriber(): EventSubscriberInterface
819
    {
820
        return new StockEditOfferFormEventSubscriber();
821
    }
822
823
    /**
824
     * @return \Symfony\Component\EventDispatcher\EventSubscriberInterface
825
     */
826
    public function createServicePointEditOfferFormEventSubscriber(): EventSubscriberInterface
827
    {
828
        return new ServicePointEditOfferFormEventSubscriber();
829
    }
830
831
    /**
832
     * @return list<\Symfony\Component\EventDispatcher\EventSubscriberInterface>
833
     */
834
    public function getEditProductOfferFormEventSubscribers(): array
835
    {
836
        return [
837
            $this->createStockEditOfferFormEventSubscriber(),
838
            $this->createServicePointEditOfferFormEventSubscriber(),
839
        ];
840
    }
841
842
    /**
843
     * @return array<\Spryker\Zed\StateMachine\Dependency\Plugin\CommandPluginInterface>
844
     */
845
    public function getStateMachineCommandPlugins(): array
846
    {
847
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PLUGINS_STATE_MACHINE_COMMAND);
848
    }
849
850
    /**
851
     * @return array<\Spryker\Zed\StateMachine\Dependency\Plugin\ConditionPluginInterface>
852
     */
853
    public function getStateMachineConditionPlugins(): array
854
    {
855
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PLUGINS_STATE_MACHINE_CONDITION);
856
    }
857
858
    /**
859
     * @return \Spryker\Zed\Mail\Business\MailFacadeInterface
860
     */
861
    public function getMailFacade(): MailFacadeInterface
862
    {
863
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_MAIL);
864
    }
865
866
    /**
867
     * @return \Spryker\Zed\StateMachine\Business\StateMachineFacadeInterface
868
     */
869
    public function getStateMachineFacade(): StateMachineFacadeInterface
870
    {
871
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_STATE_MACHINE);
872
    }
873
874
    /**
875
     * @return \Spryker\Service\FileManager\FileManagerServiceInterface
876
     */
877
    public function getFileManagerService(): FileManagerServiceInterface
878
    {
879
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::SERVICE_FILE_MANAGER);
880
    }
881
882
    /**
883
     * @return \Orm\Zed\Product\Persistence\SpyProductQuery
884
     */
885
    public function getProductQuery(): SpyProductQuery
886
    {
887
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_PRODUCT);
888
    }
889
890
    /**
891
     * @return \Orm\Zed\ProductImage\Persistence\SpyProductImageQuery
892
     */
893
    public function getProductImageQuery(): SpyProductImageQuery
894
    {
895
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_PRODUCT_IMAGE);
896
    }
897
898
    /**
899
     * @return \Spryker\Zed\Locale\Business\LocaleFacade
900
     */
901
    public function getLocaleFacade(): LocaleFacade
902
    {
903
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_LOCALE);
904
    }
905
906
    /**
907
     * @return \Spryker\Zed\Store\Business\StoreFacadeInterface
908
     */
909
    public function getStoreFacade(): StoreFacadeInterface
910
    {
911
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_STORE);
912
    }
913
914
    /**
915
     * @return \Spryker\Zed\ServicePoint\Business\ServicePointFacadeInterface
916
     */
917
    public function getServicePointFacade(): ServicePointFacadeInterface
918
    {
919
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_SERVICE_POINT);
920
    }
921
922
    /**
923
     * @return \Orm\Zed\Sales\Persistence\SpySalesOrderItemQuery
924
     */
925
    public function getSalesOrderItemPropelQuery(): SpySalesOrderItemQuery
926
    {
927
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_SALES_ORDER_ITEM);
928
    }
929
930
    /**
931
     * @return \Spryker\Zed\ShipmentType\Business\ShipmentTypeFacadeInterface
932
     */
933
    public function getShipmentTypeFacade(): ShipmentTypeFacadeInterface
934
    {
935
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_SHIPMENT_TYPE);
936
    }
937
938
    /**
939
     * @return \Spryker\Zed\ProductOffer\Business\ProductOfferFacadeInterface
940
     */
941
    public function getProductOfferFacade(): ProductOfferFacadeInterface
942
    {
943
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_PRODUCT_OFFER);
944
    }
945
946
    /**
947
     * @return \Spryker\Zed\Product\Business\ProductFacadeInterface
948
     */
949
    public function getProductFacade(): ProductFacadeInterface
950
    {
951
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_PRODUCT);
952
    }
953
954
    /**
955
     * @return \Spryker\Zed\Merchant\Business\MerchantFacadeInterface
956
     */
957
    public function getMerchantFacade(): MerchantFacadeInterface
958
    {
959
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_MERCHANT);
960
    }
961
962
    /**
963
     * @return \Spryker\Zed\Oms\Business\OmsFacadeInterface
964
     */
965
    public function getOmsFacade(): OmsFacadeInterface
966
    {
967
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_OMS);
968
    }
969
970
    /**
971
     * @return \Spryker\Zed\MerchantStock\Business\MerchantStockFacadeInterface
972
     */
973
    public function getMerchantStockFacade(): MerchantStockFacadeInterface
974
    {
975
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_MERCHANT_STOCK);
976
    }
977
978
    /**
979
     * @return \Spryker\Zed\Sales\Business\SalesFacadeInterface
980
     */
981
    public function getSalesFacade(): SalesFacadeInterface
982
    {
983
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_SALES);
984
    }
985
986
    /**
987
     * @return \Spryker\Service\UtilDateTime\UtilDateTimeServiceInterface
988
     */
989
    public function getUtilDateTimeService(): UtilDateTimeServiceInterface
990
    {
991
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::SERVICE_UTIL_DATE_TIME);
992
    }
993
994
    /**
995
     * @return \Spryker\Zed\FileManager\Business\FileManagerFacadeInterface
996
     */
997
    public function getFileManagerFacade(): FileManagerFacadeInterface
998
    {
999
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_FILE_MANAGER);
1000
    }
1001
1002
    /**
1003
     * @return \Spryker\Zed\SequenceNumber\Business\SequenceNumberFacadeInterface
1004
     */
1005
    public function getSequenceNumberFacade(): SequenceNumberFacadeInterface
1006
    {
1007
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_SEQUENCE_NUMBER);
1008
    }
1009
1010
    /**
1011
     * @return \Orm\Zed\FileManager\Persistence\SpyFileInfoQuery
1012
     */
1013
    public function getFileInfoPropelQuery(): SpyFileInfoQuery
1014
    {
1015
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_FILE_INFO);
1016
    }
1017
1018
    /**
1019
     * @return \Orm\Zed\FileManager\Persistence\SpyFileQuery
1020
     */
1021
    public function getFilePropelQuery(): SpyFileQuery
1022
    {
1023
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_FILE);
1024
    }
1025
1026
    /**
1027
     * @return \Spryker\Zed\Translator\Business\TranslatorFacadeInterface
1028
     */
1029
    public function getTranslatorFacade(): TranslatorFacadeInterface
1030
    {
1031
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_TRANSLATOR);
1032
    }
1033
1034
    /**
1035
     * @return \Spryker\Zed\Company\Business\CompanyFacadeInterface
1036
     */
1037
    public function getCompanyFacade(): CompanyFacadeInterface
1038
    {
1039
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_COMPANY);
1040
    }
1041
1042
    /**
1043
     * @return \Spryker\Zed\CompanyUser\Business\CompanyUserFacadeInterface
1044
     */
1045
    public function getCompanyUserFacade(): CompanyUserFacadeInterface
1046
    {
1047
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_COMPANY_USER);
1048
    }
1049
1050
    /**
1051
     * @return \Spryker\Zed\CompanyBusinessUnit\Business\CompanyBusinessUnitFacadeInterface
1052
     */
1053
    public function getCompanyBusinessUnitFacade(): CompanyBusinessUnitFacadeInterface
1054
    {
1055
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_COMPANY_BUSINESS_UNIT);
1056
    }
1057
1058
    /**
1059
     * @return \Spryker\Service\UtilDateTime\UtilDateTimeServiceInterface
1060
     */
1061
    public function getDateTimeService(): UtilDateTimeServiceInterface
1062
    {
1063
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::SERVICE_UTIL_DATE_TIME);
1064
    }
1065
1066
    /**
1067
     * @return \Spryker\Zed\Customer\Business\CustomerFacadeInterface
1068
     */
1069
    public function getCustomerFacade(): CustomerFacadeInterface
1070
    {
1071
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_CUSTOMER);
1072
    }
1073
1074
    /**
1075
     * @param \Generated\Shared\Transfer\SspAssetTransfer|null $sspAssetTransfer
1076
     * @param array<string, mixed> $formOptions
1077
     *
1078
     * @return \Symfony\Component\Form\FormInterface
1079
     */
1080
    public function createSspAssetForm(?SspAssetTransfer $sspAssetTransfer, array $formOptions = []): FormInterface
1081
    {
1082
        return $this->getFormFactory()->create(SspAssetForm::class, $sspAssetTransfer, $formOptions);
1083
    }
1084
1085
    /**
1086
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Form\DataProvider\SspAssetFormDataProvider
1087
     */
1088
    public function createSspAssetFormDataProvider(): SspAssetFormDataProvider
1089
    {
1090
        return new SspAssetFormDataProvider(
1091
            $this->getFacade(),
1092
            $this->getConfig(),
1093
            $this->getCompanyBusinessUnitFacade(),
1094
            $this->getCompanyFacade(),
1095
        );
1096
    }
1097
1098
    /**
1099
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Mapper\SspAssetFormDataToTransferMapperInterface
1100
     */
1101
    public function createSspAssetFormDataToTransferMapper(): SspAssetFormDataToTransferMapperInterface
1102
    {
1103
        return new SspAssetFormDataToTransferMapper();
1104
    }
1105
1106
    /**
1107
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Tabs\SspAssetTabs
1108
     */
1109
    public function createSspAssetTabs(): SspAssetTabs
1110
    {
1111
        return new SspAssetTabs();
1112
    }
1113
1114
    /**
1115
     * @param \Generated\Shared\Transfer\SspAssetTransfer $sspAssetTransfer
1116
     *
1117
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Table\AssignedBusinessUnitTable
1118
     */
1119
    public function createAssignedBusinessUnitTable(SspAssetTransfer $sspAssetTransfer): AssignedBusinessUnitTable
1120
    {
1121
        return new AssignedBusinessUnitTable(
1122
            $sspAssetTransfer,
1123
            $this->getSspAssetToCompanyBusinessUnitQuery(),
1124
            $this->getUtilDateTimeService(),
1125
        );
1126
    }
1127
1128
    /**
1129
     * @param \Generated\Shared\Transfer\SspAssetTransfer $sspAssetTransfer
1130
     *
1131
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Table\SspInquiryTable
1132
     */
1133
    public function createAssetSspInquiryTable(SspAssetTransfer $sspAssetTransfer): AssetSspInquiryTable
1134
    {
1135
        return new AssetSspInquiryTable(
1136
            $sspAssetTransfer,
1137
            $this->getSspInquirySspAssetQuery(),
1138
            $this->getUtilDateTimeService(),
1139
        );
1140
    }
1141
1142
    /**
1143
     * @param \Generated\Shared\Transfer\SspAssetConditionsTransfer $sspAssetConditionsTransfer
1144
     *
1145
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Table\SspAssetTable
1146
     */
1147
    public function createSspAssetTable(SspAssetConditionsTransfer $sspAssetConditionsTransfer): SspAssetTable
1148
    {
1149
        return new SspAssetTable(
1150
            $this->getSspAssetQuery(),
1151
            $this->getUtilDateTimeService(),
1152
            $sspAssetConditionsTransfer,
1153
            $this->createSspAssetFormDataProvider(),
1154
            $this->getConfig(),
1155
        );
1156
    }
1157
1158
    /**
1159
     * @return \Orm\Zed\SelfServicePortal\Persistence\SpySspAssetToCompanyBusinessUnitQuery
1160
     */
1161
    public function getSspAssetToCompanyBusinessUnitQuery(): SpySspAssetToCompanyBusinessUnitQuery
1162
    {
1163
        return SpySspAssetToCompanyBusinessUnitQuery::create();
1164
    }
1165
1166
    /**
1167
     * @return \Orm\Zed\SelfServicePortal\Persistence\SpySspInquirySspAssetQuery
1168
     */
1169
    public function getSspInquirySspAssetQuery(): SpySspInquirySspAssetQuery
1170
    {
1171
        return SpySspInquirySspAssetQuery::create();
1172
    }
1173
1174
    /**
1175
     * @return \Orm\Zed\SelfServicePortal\Persistence\SpySspAssetQuery
1176
     */
1177
    public function getSspAssetQuery(): SpySspAssetQuery
1178
    {
1179
        return SpySspAssetQuery::create();
1180
    }
1181
1182
    /**
1183
     * @param \Generated\Shared\Transfer\SspAssetConditionsTransfer $sspAssetConditionsTransfer
1184
     *
1185
     * @return \Symfony\Component\Form\FormInterface
1186
     */
1187
    public function getSspAssetFilterForm(SspAssetConditionsTransfer $sspAssetConditionsTransfer): FormInterface
1188
    {
1189
        return $this->getFormFactory()->create(SspAssetFilterForm::class, $sspAssetConditionsTransfer, $this->createSspAssetFilterFormDataProvider()->getOptions());
1190
    }
1191
1192
    /**
1193
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Form\DataProvider\SspAssetFilterFormDataProvider
1194
     */
1195
    public function createSspAssetFilterFormDataProvider(): SspAssetFilterFormDataProvider
1196
    {
1197
        return new SspAssetFilterFormDataProvider(
1198
            $this->getConfig(),
1199
        );
1200
    }
1201
1202
    /**
1203
     * @param string $assetReference
1204
     *
1205
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Table\SspServiceTable
1206
     */
1207
    public function createAssetSspServiceTable(string $assetReference): SspServiceTable
1208
    {
1209
        return new SspServiceTable(
1210
            $assetReference,
1211
            $this->getSalesOrderItemQuery(),
1212
            $this->getUtilDateTimeService(),
1213
        );
1214
    }
1215
1216
    /**
1217
     * @return \Orm\Zed\Sales\Persistence\SpySalesOrderItemQuery
1218
     */
1219
    public function getSalesOrderItemQuery(): SpySalesOrderItemQuery
1220
    {
1221
        return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_SALES_ORDER_ITEM);
1222
    }
1223
1224
    /**
1225
     * @return \SprykerFeature\Zed\SelfServicePortal\Business\Asset\Expander\SspAssetItemExpanderInterface
1226
     */
1227
    public function createSspAssetItemExpander(): SspAssetItemExpanderInterface
1228
    {
1229
        return new SspAssetItemExpander(
1230
            $this->getRepository(),
1231
        );
1232
    }
1233
1234
    /**
1235
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Saver\SalesOrderItemSspAssetSaverInterface
1236
     */
1237
    public function createSalesOrderItemSspAssetSaver(): SalesOrderItemSspAssetSaverInterface
1238
    {
1239
        return new SalesOrderItemSspAssetSaver(
1240
            $this->getEntityManager(),
1241
            $this->getRepository(),
1242
        );
1243
    }
1244
1245
    /**
1246
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Extractor\SalesOrderItemIdExtractorInterface
1247
     */
1248
    public function createSalesOrderItemIdExtractor(): SalesOrderItemIdExtractorInterface
1249
    {
1250
        return new SalesOrderItemIdExtractor();
1251
    }
1252
1253
    /**
1254
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Asset\Expander\OrderItemSspAssetExpanderInterface
1255
     */
1256
    public function createOrderItemSspAssetExpander(): OrderItemSspAssetExpanderInterface
1257
    {
1258
        return new OrderItemSspAssetExpander(
1259
            $this->getRepository(),
1260
            $this->createSalesOrderItemIdExtractor(),
1261
        );
1262
    }
1263
1264
    /**
1265
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Mapper\ProductAbstractTypeProductFormMapperInterface
1266
     */
1267
    public function createProductAbstractTypeProductFormMapper(): ProductAbstractTypeProductFormMapperInterface
1268
    {
1269
        return new ProductAbstractTypeProductFormMapper();
1270
    }
1271
1272
    /**
1273
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\Expander\ServiceDateTimeEnabledProductConcreteFormExpanderInterface
1274
     */
1275
    public function createServiceDateTimeEnabledProductConcreteFormExpander(): ServiceDateTimeEnabledProductConcreteFormExpanderInterface
1276
    {
1277
        return new ServiceDateTimeEnabledProductConcreteFormExpander(
1278
            $this->createServiceDateTimeEnabledProductConcreteFormDataProvider(),
1279
            $this->createServiceDateTimeEnabledProductConcreteForm(),
1280
        );
1281
    }
1282
1283
    /**
1284
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Form\Expander\ShipmentTypeProductConcreteFormExpanderInterface
1285
     */
1286
    public function createShipmentTypeProductConcreteFormExpander(): ShipmentTypeProductConcreteFormExpanderInterface
1287
    {
1288
        return new ShipmentTypeProductConcreteFormExpander(
1289
            $this->createShipmentTypeProductConcreteFormDataProvider(),
1290
            $this->createShipmentTypeProductConcreteForm(),
1291
        );
1292
    }
1293
1294
    /**
1295
     * @return \SprykerFeature\Zed\SelfServicePortal\Communication\Service\Expander\ProductOfferTableActionExpanderInterface
1296
     */
1297
    public function createProductOfferTableActionExpander(): ProductOfferTableActionExpanderInterface
1298
    {
1299
        return new ProductOfferTableActionExpander();
1300
    }
1301
}
1302