Total Complexity | 110 |
Total Lines | 1113 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
Complex classes like SelfServicePortalBusinessFactory often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use SelfServicePortalBusinessFactory, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
170 | class SelfServicePortalBusinessFactory extends AbstractBusinessFactory |
||
171 | { |
||
172 | use DataImportFactoryTrait; |
||
173 | |||
174 | /** |
||
175 | * @return list<\SprykerFeature\Zed\SelfServicePortal\Persistence\QueryStrategy\FilePermissionQueryStrategyInterface> |
||
176 | */ |
||
177 | public function createFileQueryStrategies(): array |
||
178 | { |
||
179 | return [ |
||
180 | $this->createCompanyUserFileQueryStrategy(), |
||
181 | $this->createCompanyFileQueryStrategy(), |
||
182 | $this->createCompanyBusinessUnitFileQueryStrategy(), |
||
183 | $this->createViewBusinessUnitSspAssetSspAssetFileQueryStrategy(), |
||
184 | $this->createViewCompanySspAssetSspAssetFileQueryStrategy(), |
||
185 | ]; |
||
186 | } |
||
187 | |||
188 | /** |
||
189 | * @return \SprykerFeature\Zed\SelfServicePortal\Persistence\QueryStrategy\FilePermissionQueryStrategyInterface |
||
190 | */ |
||
191 | public function createCompanyUserFileQueryStrategy(): FilePermissionQueryStrategyInterface |
||
192 | { |
||
193 | return new CompanyUserFileQueryStrategy(); |
||
194 | } |
||
195 | |||
196 | /** |
||
197 | * @return \SprykerFeature\Zed\SelfServicePortal\Persistence\QueryStrategy\FilePermissionQueryStrategyInterface |
||
198 | */ |
||
199 | public function createCompanyFileQueryStrategy(): FilePermissionQueryStrategyInterface |
||
200 | { |
||
201 | return new CompanyFileQueryStrategy(); |
||
202 | } |
||
203 | |||
204 | /** |
||
205 | * @return \SprykerFeature\Zed\SelfServicePortal\Persistence\QueryStrategy\FilePermissionQueryStrategyInterface |
||
206 | */ |
||
207 | public function createCompanyBusinessUnitFileQueryStrategy(): FilePermissionQueryStrategyInterface |
||
208 | { |
||
209 | return new CompanyBusinessUnitFileQueryStrategy(); |
||
210 | } |
||
211 | |||
212 | /** |
||
213 | * @return \SprykerFeature\Zed\SelfServicePortal\Persistence\QueryStrategy\FilePermissionQueryStrategyInterface |
||
214 | */ |
||
215 | public function createViewBusinessUnitSspAssetSspAssetFileQueryStrategy(): FilePermissionQueryStrategyInterface |
||
216 | { |
||
217 | return new ViewBusinessUnitSspAssetSspAssetFileQueryStrategy(); |
||
218 | } |
||
219 | |||
220 | /** |
||
221 | * @return \SprykerFeature\Zed\SelfServicePortal\Persistence\QueryStrategy\ViewCompanySspAssetSspAssetFileQueryStrategy |
||
222 | */ |
||
223 | public function createViewCompanySspAssetSspAssetFileQueryStrategy(): ViewCompanySspAssetSspAssetFileQueryStrategy |
||
224 | { |
||
225 | return new ViewCompanySspAssetSspAssetFileQueryStrategy(); |
||
226 | } |
||
227 | |||
228 | /** |
||
229 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\CompanyFile\Reader\CompanyFileReaderInterface |
||
230 | */ |
||
231 | public function createCompanyFileReader(): CompanyFileReaderInterface |
||
232 | { |
||
233 | return new CompanyFileReader( |
||
234 | $this->getRepository(), |
||
235 | $this->createFileQueryStrategies(), |
||
236 | ); |
||
237 | } |
||
238 | |||
239 | /** |
||
240 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\CompanyFile\Creator\FileAttachmentCreatorInterface |
||
241 | */ |
||
242 | public function createFileAttachmentCreator(): FileAttachmentCreatorInterface |
||
243 | { |
||
244 | return new FileAttachmentCreator( |
||
245 | $this->getEntityManager(), |
||
246 | ); |
||
247 | } |
||
248 | |||
249 | /** |
||
250 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\CompanyFile\Deleter\FileAttachmentDeleterInterface |
||
251 | */ |
||
252 | public function createFileAttachmentDeleter(): FileAttachmentDeleterInterface |
||
253 | { |
||
254 | return new FileAttachmentDeleter( |
||
255 | $this->createCompanyFileReader(), |
||
256 | $this->getEntityManager(), |
||
257 | ); |
||
258 | } |
||
259 | |||
260 | /** |
||
261 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\CompanyFile\DashboardDataExpander\FileDashboardDataExpanderInterface |
||
262 | */ |
||
263 | public function createFileDashboardDataExpander(): FileDashboardDataExpanderInterface |
||
264 | { |
||
265 | return new FileDashboardDataExpander($this->createCompanyFileReader(), $this->getConfig()); |
||
266 | } |
||
267 | |||
268 | /** |
||
269 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Asset\Expander\AssetFileExpanderInterface |
||
270 | */ |
||
271 | public function createAssetFileExpander(): AssetFileExpanderInterface |
||
272 | { |
||
273 | return new AssetFileExpander( |
||
274 | $this->createCompanyFileReader(), |
||
275 | ); |
||
276 | } |
||
277 | |||
278 | /** |
||
279 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Saver\ProductShipmentTypeSaverInterface |
||
280 | */ |
||
281 | public function createProductShipmentTypeSaver(): ProductShipmentTypeSaverInterface |
||
282 | { |
||
283 | return new ProductShipmentTypeSaver( |
||
284 | $this->getEntityManager(), |
||
285 | $this->getRepository(), |
||
286 | $this->getEventFacade(), |
||
287 | ); |
||
288 | } |
||
289 | |||
290 | /** |
||
291 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Saver\ServiceDateTimeEnabledSaverInterface |
||
292 | */ |
||
293 | public function createServiceDateTimeEnabledSaver(): ServiceDateTimeEnabledSaverInterface |
||
294 | { |
||
295 | return new ServiceDateTimeEnabledSaver( |
||
296 | $this->getEntityManager(), |
||
297 | ); |
||
298 | } |
||
299 | |||
300 | /** |
||
301 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\ProductConcreteShipmentTypeExpanderInterface |
||
302 | */ |
||
303 | public function createProductConcreteShipmentTypeExpander(): ProductConcreteShipmentTypeExpanderInterface |
||
304 | { |
||
305 | return new ProductConcreteShipmentTypeExpander($this->createProductShipmentTypeReader()); |
||
306 | } |
||
307 | |||
308 | /** |
||
309 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\OrderItemScheduleExpanderInterface |
||
310 | */ |
||
311 | public function createOrderItemScheduleExpander(): OrderItemScheduleExpanderInterface |
||
312 | { |
||
313 | return new OrderItemScheduleExpander(); |
||
314 | } |
||
315 | |||
316 | /** |
||
317 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Reader\ProductShipmentTypeReaderInterface |
||
318 | */ |
||
319 | public function createProductShipmentTypeReader(): ProductShipmentTypeReaderInterface |
||
320 | { |
||
321 | return new ProductShipmentTypeReader( |
||
322 | $this->getRepository(), |
||
323 | $this->getShipmentTypeFacade(), |
||
324 | $this->createShipmentTypeGrouper(), |
||
325 | ); |
||
326 | } |
||
327 | |||
328 | /** |
||
329 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Grouper\ShipmentTypeGrouperInterface |
||
330 | */ |
||
331 | public function createShipmentTypeGrouper(): ShipmentTypeGrouperInterface |
||
332 | { |
||
333 | return new ShipmentTypeGrouper(); |
||
334 | } |
||
335 | |||
336 | /** |
||
337 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Storage\Expander\ShipmentTypeProductConcreteStorageExpanderInterface |
||
338 | */ |
||
339 | public function createShipmentTypeProductConcreteStorageExpander(): ShipmentTypeProductConcreteStorageExpanderInterface |
||
340 | { |
||
341 | return new ShipmentTypeProductConcreteStorageExpander( |
||
342 | $this->createProductShipmentTypeReader(), |
||
343 | $this->getRepository(), |
||
344 | ); |
||
345 | } |
||
346 | |||
347 | /** |
||
348 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Storage\Expander\ProductTypeProductConcreteStorageExpanderInterface |
||
349 | */ |
||
350 | public function createProductTypeProductConcreteStorageExpander(): ProductTypeProductConcreteStorageExpanderInterface |
||
351 | { |
||
352 | return new ProductTypeProductConcreteStorageExpander( |
||
353 | $this->getRepository(), |
||
354 | ); |
||
355 | } |
||
356 | |||
357 | /** |
||
358 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Resolver\PaymentMethodResolverInterface |
||
359 | */ |
||
360 | public function createPaymentMethodResolver(): PaymentMethodResolverInterface |
||
361 | { |
||
362 | return new PaymentMethodResolver( |
||
363 | $this->getConfig(), |
||
364 | ); |
||
365 | } |
||
366 | |||
367 | /** |
||
368 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Updater\OrderItemScheduleUpdaterInterface |
||
369 | */ |
||
370 | public function createOrderItemScheduleUpdater(): OrderItemScheduleUpdaterInterface |
||
371 | { |
||
372 | return new OrderItemScheduleUpdater( |
||
373 | $this->getSalesFacade(), |
||
374 | $this->createPaymentMethodResolver(), |
||
375 | ); |
||
376 | } |
||
377 | |||
378 | /** |
||
379 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Saver\ProductAbstractTypeSaverInterface |
||
380 | */ |
||
381 | public function createProductAbstractTypeSaver(): ProductAbstractTypeSaverInterface |
||
382 | { |
||
383 | return new ProductAbstractTypeSaver( |
||
384 | $this->getEntityManager(), |
||
385 | ); |
||
386 | } |
||
387 | |||
388 | /** |
||
389 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\ProductAbstractTypeExpanderInterface |
||
390 | */ |
||
391 | public function createProductAbstractTypeExpander(): ProductAbstractTypeExpanderInterface |
||
392 | { |
||
393 | return new ProductAbstractTypeExpander( |
||
394 | $this->getRepository(), |
||
395 | ); |
||
396 | } |
||
397 | |||
398 | /** |
||
399 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Reader\ServiceReaderInterface |
||
400 | */ |
||
401 | public function createServiceReader(): ServiceReaderInterface |
||
402 | { |
||
403 | return new ServiceReader( |
||
404 | $this->getRepository(), |
||
405 | $this->createSspServiceCustomerPermissionExpander(), |
||
406 | ); |
||
407 | } |
||
408 | |||
409 | /** |
||
410 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Permission\SspServiceCustomerPermissionExpanderInterface |
||
411 | */ |
||
412 | public function createSspServiceCustomerPermissionExpander(): SspServiceCustomerPermissionExpanderInterface |
||
413 | { |
||
414 | return new SspServiceCustomerPermissionExpander(); |
||
415 | } |
||
416 | |||
417 | /** |
||
418 | * @return \Spryker\Zed\DataImport\Business\Model\DataImporterInterface |
||
419 | */ |
||
420 | public function getProductShipmentTypeDataImporter(): DataImporterInterface |
||
421 | { |
||
422 | /** @var \Spryker\Zed\DataImport\Business\Model\DataImporter $dataImporter */ |
||
423 | $dataImporter = $this->getCsvDataImporterFromConfig( |
||
424 | $this->getConfig()->getProductShipmentTypeDataImporterConfiguration(), |
||
425 | ); |
||
426 | |||
427 | /** @var \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBroker $dataSetStepBroker */ |
||
428 | $dataSetStepBroker = $this->createTransactionAwareDataSetStepBroker(); |
||
429 | $dataSetStepBroker->addStep($this->createProductSkuToIdProductStep()); |
||
430 | $dataSetStepBroker->addStep($this->createShipmentTypeKeyToIdShipmentTypeStep()); |
||
431 | $dataSetStepBroker->addStep($this->createProductShipmentTypeWriterStep()); |
||
432 | |||
433 | $dataImporter->addDataSetStepBroker($dataSetStepBroker); |
||
434 | |||
435 | return $dataImporter; |
||
436 | } |
||
437 | |||
438 | /** |
||
439 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
440 | */ |
||
441 | public function createProductSkuToIdProductStep(): DataImportStepInterface |
||
442 | { |
||
443 | return new ProductSkuToIdProductStep( |
||
444 | $this->getProductQuery(), |
||
445 | ); |
||
446 | } |
||
447 | |||
448 | /** |
||
449 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
450 | */ |
||
451 | public function createShipmentTypeKeyToIdShipmentTypeStep(): DataImportStepInterface |
||
452 | { |
||
453 | return new ShipmentTypeKeyToIdShipmentTypeStep( |
||
454 | $this->getShipmentTypeQuery(), |
||
455 | ); |
||
456 | } |
||
457 | |||
458 | /** |
||
459 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
460 | */ |
||
461 | public function createProductShipmentTypeWriterStep(): DataImportStepInterface |
||
462 | { |
||
463 | return new ProductShipmentTypeWriterStep( |
||
464 | $this->getProductShipmentTypeQuery(), |
||
465 | ); |
||
466 | } |
||
467 | |||
468 | /** |
||
469 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\ShipmentTypeItemExpanderInterface |
||
470 | */ |
||
471 | public function createShipmentTypeItemExpander(): ShipmentTypeItemExpanderInterface |
||
472 | { |
||
473 | return new ShipmentTypeItemExpander( |
||
474 | $this->createShipmentTypeReader(), |
||
475 | $this->getRepository(), |
||
476 | $this->getProductOfferShipmentTypeFacade(), |
||
477 | ); |
||
478 | } |
||
479 | |||
480 | /** |
||
481 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\ServicePointItemExpanderInterface |
||
482 | */ |
||
483 | public function createServicePointItemExpander(): ServicePointItemExpanderInterface |
||
484 | { |
||
485 | return new ServicePointItemExpander( |
||
486 | $this->createServicePointReader(), |
||
487 | ); |
||
488 | } |
||
489 | |||
490 | /** |
||
491 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Reader\ShipmentTypeReaderInterface |
||
492 | */ |
||
493 | public function createShipmentTypeReader(): ShipmentTypeReaderInterface |
||
494 | { |
||
495 | return new ShipmentTypeReader( |
||
496 | $this->getShipmentTypeFacade(), |
||
497 | $this->getConfig(), |
||
498 | ); |
||
499 | } |
||
500 | |||
501 | /** |
||
502 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Reader\ServicePointReaderInterface |
||
503 | */ |
||
504 | public function createServicePointReader(): ServicePointReaderInterface |
||
505 | { |
||
506 | return new ServicePointReader( |
||
507 | $this->getServicePointFacade(), |
||
508 | ); |
||
509 | } |
||
510 | |||
511 | /** |
||
512 | * @return \Spryker\Zed\DataImport\Business\Model\DataImporterInterface |
||
513 | */ |
||
514 | public function getProductAbstractTypeDataImporter(): DataImporterInterface |
||
515 | { |
||
516 | $config = $this->getConfig()->getProductAbstractTypeDataImporterConfiguration(); |
||
517 | |||
518 | /** @var \Spryker\Zed\DataImport\Business\Model\DataImporter $dataImporter */ |
||
519 | $dataImporter = $this->getCsvDataImporterFromConfig($config); |
||
520 | |||
521 | /** @var \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetStepBroker $dataSetStepBroker */ |
||
522 | $dataSetStepBroker = $this->createTransactionAwareDataSetStepBroker(); |
||
523 | $dataSetStepBroker->addStep($this->createProductAbstractTypeWriterStep()); |
||
524 | |||
525 | $dataImporter->addDataSetStepBroker($dataSetStepBroker); |
||
526 | |||
527 | return $dataImporter; |
||
528 | } |
||
529 | |||
530 | /** |
||
531 | * @return \Spryker\Zed\DataImport\Business\Model\DataImporterInterface |
||
532 | */ |
||
533 | public function getProductAbstractToProductAbstractTypeDataImporter(): DataImporterInterface |
||
549 | } |
||
550 | |||
551 | /** |
||
552 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
553 | */ |
||
554 | public function createProductAbstractTypeWriterStep(): DataImportStepInterface |
||
555 | { |
||
556 | return new ProductAbstractTypeWriterStep( |
||
557 | $this->getProductAbstractTypeQuery(), |
||
558 | ); |
||
559 | } |
||
560 | |||
561 | /** |
||
562 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
563 | */ |
||
564 | public function createProductAbstractSkuToIdProductAbstractStep(): DataImportStepInterface |
||
565 | { |
||
566 | return new ProductAbstractSkuToIdProductAbstractStep( |
||
567 | $this->getProductAbstractQuery(), |
||
568 | ); |
||
569 | } |
||
570 | |||
571 | /** |
||
572 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
573 | */ |
||
574 | public function createProductAbstractTypeKeyToIdProductAbstractTypeStep(): DataImportStepInterface |
||
575 | { |
||
576 | return new ProductAbstractTypeKeyToIdProductAbstractTypeStep( |
||
577 | $this->getProductAbstractTypeQuery(), |
||
578 | ); |
||
579 | } |
||
580 | |||
581 | /** |
||
582 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
583 | */ |
||
584 | public function createProductAbstractToProductAbstractTypeWriterStep(): DataImportStepInterface |
||
585 | { |
||
586 | return new ProductAbstractToProductAbstractTypeWriterStep( |
||
587 | $this->getProductAbstractToProductAbstractTypeQuery(), |
||
588 | ); |
||
589 | } |
||
590 | |||
591 | /** |
||
592 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Canceler\OrderItemCancelerInterface |
||
593 | */ |
||
594 | public function createOrderItemCanceler(): OrderItemCancelerInterface |
||
595 | { |
||
596 | return new OrderItemCanceler( |
||
597 | $this->getOmsFacade(), |
||
598 | ); |
||
599 | } |
||
600 | |||
601 | /** |
||
602 | * @return \Orm\Zed\SelfServicePortal\Persistence\SpyProductAbstractTypeQuery |
||
603 | */ |
||
604 | public function getProductAbstractTypeQuery(): SpyProductAbstractTypeQuery |
||
605 | { |
||
606 | return SpyProductAbstractTypeQuery::create(); |
||
607 | } |
||
608 | |||
609 | /** |
||
610 | * @return \Orm\Zed\SelfServicePortal\Persistence\SpyProductAbstractToProductAbstractTypeQuery |
||
611 | */ |
||
612 | public function getProductAbstractToProductAbstractTypeQuery(): SpyProductAbstractToProductAbstractTypeQuery |
||
613 | { |
||
614 | return SpyProductAbstractToProductAbstractTypeQuery::create(); |
||
615 | } |
||
616 | |||
617 | /** |
||
618 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Filter\QuoteItemFilterInterface |
||
619 | */ |
||
620 | public function createQuoteItemFilter(): QuoteItemFilterInterface |
||
621 | { |
||
622 | return new QuoteItemFilter( |
||
623 | $this->getConfig(), |
||
624 | $this->getMessengerFacade(), |
||
625 | ); |
||
626 | } |
||
627 | |||
628 | /** |
||
629 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Dashboard\Reader\DashboardReaderInterface |
||
630 | */ |
||
631 | public function createDashboardReader(): DashboardReaderInterface |
||
632 | { |
||
633 | return new DashboardReader($this->getDashboardDataExpanderPlugins()); |
||
634 | } |
||
635 | |||
636 | /** |
||
637 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Writer\SspInquiryWriterInterface |
||
638 | */ |
||
639 | public function createSspInquiryWriter(): SspInquiryWriterInterface |
||
640 | { |
||
641 | return new SspInquiryWriter( |
||
642 | $this->getEntityManager(), |
||
643 | $this->getSequenceNumberFacade(), |
||
644 | $this->getStateMachineFacade(), |
||
645 | $this->getConfig(), |
||
646 | $this->createSspInquiryValidator(), |
||
647 | $this->getSspInquiryPreCreateHooks(), |
||
648 | $this->getSspInquiryPostCreateHooks(), |
||
649 | ); |
||
650 | } |
||
651 | |||
652 | /** |
||
653 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Writer\SspInquiryStateWriterInterface |
||
654 | */ |
||
655 | public function createSspInquiryStateWriter(): SspInquiryStateWriterInterface |
||
656 | { |
||
657 | return new SspInquiryStateWriter( |
||
658 | $this->createSspInquiryReader(), |
||
659 | $this->getStateMachineFacade(), |
||
660 | $this->getConfig(), |
||
661 | ); |
||
662 | } |
||
663 | |||
664 | /** |
||
665 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Approver\SspInquiryApprovalHandlerInterface |
||
666 | */ |
||
667 | public function createSspInquiryApprovalHandler(): SspInquiryApprovalHandlerInterface |
||
668 | { |
||
669 | return new SspInquiryApprovalHandler( |
||
670 | $this->createSspInquiryReader(), |
||
671 | $this->getMailFacade(), |
||
672 | $this->getCustomerFacade(), |
||
673 | $this->getConfig(), |
||
674 | ); |
||
675 | } |
||
676 | |||
677 | /** |
||
678 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Approver\SspInquiryRejectionHandlerInterface |
||
679 | */ |
||
680 | public function createSspInquiryRejectionHandler(): SspInquiryRejectionHandlerInterface |
||
681 | { |
||
682 | return new SspInquiryRejectionHandler( |
||
683 | $this->createSspInquiryReader(), |
||
684 | $this->getMailFacade(), |
||
685 | $this->getCustomerFacade(), |
||
686 | $this->getConfig(), |
||
687 | ); |
||
688 | } |
||
689 | |||
690 | /** |
||
691 | * @return array<\SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquiryExpanderInterface> |
||
692 | */ |
||
693 | public function getSspInquiryExpanders(): array |
||
694 | { |
||
695 | return [ |
||
696 | $this->createManualEventsSspInquiryExpander(), |
||
697 | $this->createFileSspInquiryExpander(), |
||
698 | $this->createSalesOrderSspInquiryExpander(), |
||
699 | $this->createCompanyUserSspInquiryExpander(), |
||
700 | $this->createStatusHistorySspInquiryExpander(), |
||
701 | $this->createCommentsSspInquiryExpander(), |
||
702 | $this->createSsAssetSspInquiryExpander(), |
||
703 | ]; |
||
704 | } |
||
705 | |||
706 | /** |
||
707 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquiryExpanderInterface |
||
708 | */ |
||
709 | public function createManualEventsSspInquiryExpander(): SspInquiryExpanderInterface |
||
710 | { |
||
711 | return new ManualEventsSspInquiryExpander( |
||
712 | $this->getConfig(), |
||
713 | $this->getStateMachineFacade(), |
||
714 | ); |
||
715 | } |
||
716 | |||
717 | /** |
||
718 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquiryExpanderInterface |
||
719 | */ |
||
720 | public function createStatusHistorySspInquiryExpander(): SspInquiryExpanderInterface |
||
721 | { |
||
722 | return new StatusHistorySspInquiryExpander( |
||
723 | $this->getConfig(), |
||
724 | $this->getStateMachineFacade(), |
||
725 | ); |
||
726 | } |
||
727 | |||
728 | /** |
||
729 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquiryExpanderInterface |
||
730 | */ |
||
731 | public function createFileSspInquiryExpander(): SspInquiryExpanderInterface |
||
732 | { |
||
733 | return new FileSspInquiryExpander( |
||
734 | $this->getFileManagerFacade(), |
||
735 | $this->getRepository(), |
||
736 | ); |
||
737 | } |
||
738 | |||
739 | /** |
||
740 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquiryExpanderInterface |
||
741 | */ |
||
742 | public function createCompanyUserSspInquiryExpander(): SspInquiryExpanderInterface |
||
743 | { |
||
744 | return new CompanyUserSspInquiryExpander( |
||
745 | $this->getCompanyUserFacade(), |
||
746 | ); |
||
747 | } |
||
748 | |||
749 | /** |
||
750 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquiryExpanderInterface |
||
751 | */ |
||
752 | public function createSalesOrderSspInquiryExpander(): SspInquiryExpanderInterface |
||
753 | { |
||
754 | return new SalesOrderSspInquiryExpander( |
||
755 | $this->getRepository(), |
||
756 | $this->getSalesFacade(), |
||
757 | ); |
||
758 | } |
||
759 | |||
760 | /** |
||
761 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquiryExpanderInterface |
||
762 | */ |
||
763 | public function createSsAssetSspInquiryExpander(): SspInquiryExpanderInterface |
||
764 | { |
||
765 | return new SspAssetSspInquiryExpander( |
||
766 | $this->getRepository(), |
||
767 | $this->createSspAssetReader(), |
||
768 | ); |
||
769 | } |
||
770 | |||
771 | /** |
||
772 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquiryExpanderInterface |
||
773 | */ |
||
774 | public function createCommentsSspInquiryExpander(): SspInquiryExpanderInterface |
||
775 | { |
||
776 | return new CommentsSspInquiryExpander( |
||
777 | $this->getCommentFacade(), |
||
778 | ); |
||
779 | } |
||
780 | |||
781 | /** |
||
782 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Reader\SspInquiryReaderInterface |
||
783 | */ |
||
784 | public function createSspInquiryReader(): SspInquiryReaderInterface |
||
785 | { |
||
786 | return new SspInquiryReader( |
||
787 | $this->getRepository(), |
||
788 | $this->getSspInquiryExpanders(), |
||
789 | $this->createSspInquiryConditionExpander(), |
||
790 | ); |
||
791 | } |
||
792 | |||
793 | /** |
||
794 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Writer\SspInquiryFileDeleterInterface |
||
795 | */ |
||
796 | public function createSspInquiryFileDeleter(): SspInquiryFileDeleterInterface |
||
797 | { |
||
798 | return new SspInquiryFileDeleter( |
||
799 | $this->getEntityManager(), |
||
800 | ); |
||
801 | } |
||
802 | |||
803 | /** |
||
804 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Validator\SspInquiryValidatorInterface |
||
805 | */ |
||
806 | public function createSspInquiryValidator(): SspInquiryValidatorInterface |
||
807 | { |
||
808 | return new SspInquiryValidator($this->getConfig()); |
||
809 | } |
||
810 | |||
811 | /** |
||
812 | * @return array<\SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PreCreate\SspInquiryPreCreateHookInterface> |
||
813 | */ |
||
814 | public function getSspInquiryPreCreateHooks(): array |
||
815 | { |
||
816 | return [ |
||
817 | $this->createFileSspInquiryPreCreateHook(), |
||
818 | $this->createOrderSspInquiryPreCreateHook(), |
||
819 | $this->createStoreSspInquiryPreCreateHook(), |
||
820 | $this->createSspAssetSspInquiryPreCreateHook(), |
||
821 | ]; |
||
822 | } |
||
823 | |||
824 | /** |
||
825 | * @return array<\SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PostCreate\SspInquiryPostCreateHookInterface> |
||
826 | */ |
||
827 | public function getSspInquiryPostCreateHooks(): array |
||
828 | { |
||
829 | return [ |
||
830 | $this->createOrderSspInquiryPostCreateHook(), |
||
831 | $this->createFileSspInquiryPostCreateHook(), |
||
832 | $this->createStateMachineSspInquiryPostCreateHook(), |
||
833 | $this->createSspAssetSspInquiryPostCreateHook(), |
||
834 | ]; |
||
835 | } |
||
836 | |||
837 | /** |
||
838 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PreCreate\SspInquiryPreCreateHookInterface |
||
839 | */ |
||
840 | public function createFileSspInquiryPreCreateHook(): SspInquiryPreCreateHookInterface |
||
841 | { |
||
842 | return new FileSspInquiryPreCreateHook( |
||
843 | $this->getFileManagerFacade(), |
||
844 | $this->getConfig(), |
||
845 | ); |
||
846 | } |
||
847 | |||
848 | /** |
||
849 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PreCreate\SspInquiryPreCreateHookInterface |
||
850 | */ |
||
851 | public function createStoreSspInquiryPreCreateHook(): SspInquiryPreCreateHookInterface |
||
852 | { |
||
853 | return new StoreSspInquiryPreCreateHook( |
||
854 | $this->getStoreFacade(), |
||
855 | ); |
||
856 | } |
||
857 | |||
858 | /** |
||
859 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PreCreate\SspInquiryPreCreateHookInterface |
||
860 | */ |
||
861 | public function createOrderSspInquiryPreCreateHook(): SspInquiryPreCreateHookInterface |
||
862 | { |
||
863 | return new OrderSspInquiryPreCreateHook( |
||
864 | $this->getSalesFacade(), |
||
865 | ); |
||
866 | } |
||
867 | |||
868 | /** |
||
869 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PreCreate\SspInquiryPreCreateHookInterface |
||
870 | */ |
||
871 | public function createSspAssetSspInquiryPreCreateHook(): SspInquiryPreCreateHookInterface |
||
872 | { |
||
873 | return new SspAssetSspInquiryPreCreateHook( |
||
874 | $this->createSspAssetReader(), |
||
875 | ); |
||
876 | } |
||
877 | |||
878 | /** |
||
879 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PostCreate\SspInquiryPostCreateHookInterface |
||
880 | */ |
||
881 | public function createOrderSspInquiryPostCreateHook(): SspInquiryPostCreateHookInterface |
||
882 | { |
||
883 | return new OrderSspInquiryPostCreateHook( |
||
884 | $this->getEntityManager(), |
||
885 | ); |
||
886 | } |
||
887 | |||
888 | /** |
||
889 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PostCreate\SspInquiryPostCreateHookInterface |
||
890 | */ |
||
891 | public function createFileSspInquiryPostCreateHook(): SspInquiryPostCreateHookInterface |
||
895 | ); |
||
896 | } |
||
897 | |||
898 | /** |
||
899 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PostCreate\SspInquiryPostCreateHookInterface |
||
900 | */ |
||
901 | public function createSspAssetSspInquiryPostCreateHook(): SspInquiryPostCreateHookInterface |
||
902 | { |
||
903 | return new SspAssetSspInquiryPostCreateHook( |
||
904 | $this->getEntityManager(), |
||
905 | ); |
||
906 | } |
||
907 | |||
908 | /** |
||
909 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Hooks\PostCreate\StateMachineSspInquiryPostCreateHook |
||
910 | */ |
||
911 | public function createStateMachineSspInquiryPostCreateHook(): SspInquiryPostCreateHookInterface |
||
912 | { |
||
913 | return new StateMachineSspInquiryPostCreateHook( |
||
914 | $this->getConfig(), |
||
915 | $this->getStateMachineFacade(), |
||
916 | ); |
||
917 | } |
||
918 | |||
919 | /** |
||
920 | * @return \Spryker\Zed\DataImport\Business\Model\DataImporterInterface |
||
921 | */ |
||
922 | public function getSspInquiryDataImporter(): DataImporterInterface |
||
923 | { |
||
924 | /** @var \Spryker\Zed\DataImport\Business\Model\DataImporter $dataImporter */ |
||
925 | $dataImporter = $this->getCsvDataImporterFromConfig( |
||
926 | $this->getConfig()->getSspInquiryDataImporterConfiguration(), |
||
927 | ); |
||
928 | |||
929 | $dataSetStepBroker = $this->createTransactionAwareDataSetStepBroker(); |
||
930 | if ($dataSetStepBroker instanceof DataImportStepAwareInterface) { |
||
931 | $dataSetStepBroker |
||
932 | ->addStep($this->createCompanyUserKeyToIdCompanyUserStep()) |
||
933 | ->addStep($this->createStoreCodeToStoreIdStep()) |
||
934 | ->addStep($this->createSspInquiryWriterStep()) |
||
935 | ->addStep($this->createSspInquiryStateMachineWriterStep()); |
||
936 | } |
||
937 | |||
938 | $dataImporter->addDataSetStepBroker($dataSetStepBroker); |
||
939 | |||
940 | return $dataImporter; |
||
941 | } |
||
942 | |||
943 | /** |
||
944 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
945 | */ |
||
946 | public function createSspInquiryWriterStep(): DataImportStepInterface |
||
947 | { |
||
948 | return new SspInquiryWriterStep( |
||
949 | $this->getConfig(), |
||
950 | $this->getSequenceNumberFacade(), |
||
951 | ); |
||
952 | } |
||
953 | |||
954 | /** |
||
955 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
956 | */ |
||
957 | public function createCompanyUserKeyToIdCompanyUserStep(): DataImportStepInterface |
||
958 | { |
||
959 | return new CompanyUserKeyToIdCompanyUserStep($this->getCompanyUserQuery()); |
||
960 | } |
||
961 | |||
962 | /** |
||
963 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
964 | */ |
||
965 | public function createStoreCodeToStoreIdStep(): DataImportStepInterface |
||
966 | { |
||
967 | return new StoreCodeToStoreIdStep($this->getStoreFacade()); |
||
968 | } |
||
969 | |||
970 | /** |
||
971 | * @return \Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface |
||
972 | */ |
||
973 | public function createSspInquiryStateMachineWriterStep(): DataImportStepInterface |
||
974 | { |
||
975 | return new SspInquiryStateMachineWriterStep( |
||
976 | $this->getStateMachineFacade(), |
||
977 | $this->getConfig(), |
||
978 | ); |
||
979 | } |
||
980 | |||
981 | /** |
||
982 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\DashboardDataExpander\InquiryDashboardDataExpanderInterface |
||
983 | */ |
||
984 | public function createInquiryDashboardDataExpander(): InquiryDashboardDataExpanderInterface |
||
985 | { |
||
986 | return new InquiryDashboardDataExpander($this->createSspInquiryReader(), $this->getConfig()); |
||
987 | } |
||
988 | |||
989 | /** |
||
990 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquiryCriteriaExpanderInterface |
||
991 | */ |
||
992 | public function createSspInquiryConditionExpander(): SspInquiryCriteriaExpanderInterface |
||
995 | } |
||
996 | |||
997 | /** |
||
998 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Inquiry\Expander\SspInquirySspAssetExpanderInterface |
||
999 | */ |
||
1000 | public function createSspInquirySspAssetExpander(): SspInquirySspAssetExpanderInterface |
||
1001 | { |
||
1002 | return new SspInquirySspAssetExpander( |
||
1003 | $this->createSspInquiryReader(), |
||
1004 | $this->getConfig(), |
||
1005 | ); |
||
1006 | } |
||
1007 | |||
1008 | /** |
||
1009 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Asset\DashboardDataExpander\SspAssetDashboardDataExpanderInterface |
||
1010 | */ |
||
1011 | public function createSspAssetDashboardDataExpander(): SspAssetDashboardDataExpanderInterface |
||
1012 | { |
||
1013 | return new SspAssetSspAssetDashboardDataExpander($this->createSspAssetReader()); |
||
1014 | } |
||
1015 | |||
1016 | /** |
||
1017 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Asset\Permission\SspAssetCustomerPermissionExpanderInterface |
||
1018 | */ |
||
1019 | public function createSspAssetCustomerPermissionExpander(): SspAssetCustomerPermissionExpanderInterface |
||
1020 | { |
||
1021 | return new SspAssetCustomerPermissionExpander(); |
||
1022 | } |
||
1023 | |||
1024 | /** |
||
1025 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Asset\Reader\SspAssetReaderInterface |
||
1026 | */ |
||
1027 | public function createSspAssetReader(): SspAssetReaderInterface |
||
1028 | { |
||
1029 | return new SspAssetReader( |
||
1030 | $this->getRepository(), |
||
1031 | $this->getFileManagerFacade(), |
||
1032 | $this->getSspAssetManagementExpanderPlugins(), |
||
1033 | $this->createSspAssetCustomerPermissionExpander(), |
||
1034 | ); |
||
1035 | } |
||
1036 | |||
1037 | /** |
||
1038 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Asset\Writer\SspAssetWriterInterface |
||
1039 | */ |
||
1040 | public function createSspAssetWriter(): SspAssetWriterInterface |
||
1041 | { |
||
1042 | return new SspAssetWriter( |
||
1043 | $this->getEntityManager(), |
||
1044 | $this->getRepository(), |
||
1045 | $this->createSspAssetValidator(), |
||
1046 | $this->getSequenceNumberFacade(), |
||
1047 | $this->getConfig(), |
||
1048 | $this->createFileSspAssetWriter(), |
||
1049 | ); |
||
1050 | } |
||
1051 | |||
1052 | /** |
||
1053 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Asset\Writer\FileSspAssetWriterInterface |
||
1054 | */ |
||
1055 | public function createFileSspAssetWriter(): FileSspAssetWriterInterface |
||
1056 | { |
||
1057 | return new FileSspAssetWriter( |
||
1058 | $this->getFileManagerFacade(), |
||
1059 | $this->getConfig(), |
||
1060 | ); |
||
1061 | } |
||
1062 | |||
1063 | /** |
||
1064 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\SspAssetExpanderInterface |
||
1065 | */ |
||
1066 | public function createSspAssetExpander(): SspAssetExpanderInterface |
||
1067 | { |
||
1068 | return new SspAssetExpander($this->createServiceReader()); |
||
1069 | } |
||
1070 | |||
1071 | /** |
||
1072 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Asset\Validator\SspAssetValidatorInterface |
||
1073 | */ |
||
1074 | public function createSspAssetValidator(): SspAssetValidatorInterface |
||
1075 | { |
||
1076 | return new SspAssetValidator(); |
||
1077 | } |
||
1078 | |||
1079 | /** |
||
1080 | * @return \SprykerFeature\Zed\SelfServicePortal\Persistence\SelfServicePortalEntityManagerInterface |
||
1081 | */ |
||
1082 | public function getPersistenceEntityManager(): SelfServicePortalEntityManagerInterface |
||
1083 | { |
||
1084 | return $this->getEntityManager(); |
||
1085 | } |
||
1086 | |||
1087 | /** |
||
1088 | * @return \Spryker\Zed\StateMachine\Business\StateMachineFacadeInterface |
||
1089 | */ |
||
1090 | public function getStateMachineFacade(): StateMachineFacadeInterface |
||
1091 | { |
||
1092 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_STATE_MACHINE); |
||
1093 | } |
||
1094 | |||
1095 | /** |
||
1096 | * @return \Spryker\Zed\SequenceNumber\Business\SequenceNumberFacadeInterface |
||
1097 | */ |
||
1098 | public function getSequenceNumberFacade(): SequenceNumberFacadeInterface |
||
1099 | { |
||
1100 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_SEQUENCE_NUMBER); |
||
1101 | } |
||
1102 | |||
1103 | /** |
||
1104 | * @return \Spryker\Zed\FileManager\Business\FileManagerFacadeInterface |
||
1105 | */ |
||
1106 | public function getFileManagerFacade(): FileManagerFacadeInterface |
||
1107 | { |
||
1108 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_FILE_MANAGER); |
||
1109 | } |
||
1110 | |||
1111 | /** |
||
1112 | * @return \Spryker\Zed\CompanyUser\Business\CompanyUserFacadeInterface |
||
1113 | */ |
||
1114 | public function getCompanyUserFacade(): CompanyUserFacadeInterface |
||
1115 | { |
||
1116 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_COMPANY_USER); |
||
1117 | } |
||
1118 | |||
1119 | /** |
||
1120 | * @return \Orm\Zed\CompanyUser\Persistence\SpyCompanyUserQuery |
||
1121 | */ |
||
1122 | public function getCompanyUserQuery(): SpyCompanyUserQuery |
||
1123 | { |
||
1124 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_COMPANY_USER); |
||
1125 | } |
||
1126 | |||
1127 | /** |
||
1128 | * @return \Spryker\Zed\Store\Business\StoreFacadeInterface |
||
1129 | */ |
||
1130 | public function getStoreFacade(): StoreFacadeInterface |
||
1133 | } |
||
1134 | |||
1135 | /** |
||
1136 | * @return \Spryker\Zed\Comment\Business\CommentFacadeInterface |
||
1137 | */ |
||
1138 | public function getCommentFacade(): CommentFacadeInterface |
||
1139 | { |
||
1140 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_COMMENT); |
||
1141 | } |
||
1142 | |||
1143 | /** |
||
1144 | * @return array<int, \SprykerFeature\Zed\SelfServicePortal\Dependency\Plugin\DashboardDataExpanderPluginInterface> |
||
1145 | */ |
||
1146 | public function getDashboardDataExpanderPlugins(): array |
||
1147 | { |
||
1148 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PLUGINS_DASHBOARD_DATA_PROVIDER); |
||
1149 | } |
||
1150 | |||
1151 | /** |
||
1152 | * @return \Spryker\Zed\Event\Business\EventFacadeInterface |
||
1153 | */ |
||
1154 | public function getEventFacade(): EventFacadeInterface |
||
1155 | { |
||
1156 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_EVENT); |
||
1157 | } |
||
1158 | |||
1159 | /** |
||
1160 | * @return \Spryker\Zed\ShipmentType\Business\ShipmentTypeFacadeInterface |
||
1161 | */ |
||
1162 | public function getShipmentTypeFacade(): ShipmentTypeFacadeInterface |
||
1163 | { |
||
1164 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_SHIPMENT_TYPE); |
||
1165 | } |
||
1166 | |||
1167 | /** |
||
1168 | * @return \Orm\Zed\Product\Persistence\SpyProductQuery |
||
1169 | */ |
||
1170 | public function getProductQuery(): SpyProductQuery |
||
1171 | { |
||
1172 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_PRODUCT); |
||
1173 | } |
||
1174 | |||
1175 | /** |
||
1176 | * @return \Orm\Zed\ShipmentType\Persistence\SpyShipmentTypeQuery |
||
1177 | */ |
||
1178 | public function getShipmentTypeQuery(): SpyShipmentTypeQuery |
||
1179 | { |
||
1180 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_SHIPMENT_TYPE); |
||
1181 | } |
||
1182 | |||
1183 | /** |
||
1184 | * @return \Orm\Zed\SelfServicePortal\Persistence\SpyProductShipmentTypeQuery |
||
1185 | */ |
||
1186 | public function getProductShipmentTypeQuery(): SpyProductShipmentTypeQuery |
||
1187 | { |
||
1188 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_PRODUCT_SHIPMENT_TYPE); |
||
1189 | } |
||
1190 | |||
1191 | /** |
||
1192 | * @return \Spryker\Zed\ProductOfferShipmentType\Business\ProductOfferShipmentTypeFacadeInterface |
||
1193 | */ |
||
1194 | public function getProductOfferShipmentTypeFacade(): ProductOfferShipmentTypeFacadeInterface |
||
1195 | { |
||
1196 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_PRODUCT_OFFER_SHIPMENT_TYPE); |
||
1197 | } |
||
1198 | |||
1199 | /** |
||
1200 | * @return \Orm\Zed\Product\Persistence\SpyProductAbstractQuery |
||
1201 | */ |
||
1202 | public function getProductAbstractQuery(): SpyProductAbstractQuery |
||
1203 | { |
||
1204 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PROPEL_QUERY_PRODUCT_ABSTRACT); |
||
1205 | } |
||
1206 | |||
1207 | /** |
||
1208 | * @return \Spryker\Zed\Sales\Business\SalesFacadeInterface |
||
1209 | */ |
||
1210 | public function getSalesFacade(): SalesFacadeInterface |
||
1211 | { |
||
1212 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_SALES); |
||
1213 | } |
||
1214 | |||
1215 | /** |
||
1216 | * @return \Spryker\Zed\ServicePoint\Business\ServicePointFacadeInterface |
||
1217 | */ |
||
1218 | public function getServicePointFacade(): ServicePointFacadeInterface |
||
1219 | { |
||
1220 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_SERVICE_POINT); |
||
1221 | } |
||
1222 | |||
1223 | /** |
||
1224 | * @return \Spryker\Zed\Oms\Business\OmsFacadeInterface |
||
1225 | */ |
||
1226 | public function getOmsFacade(): OmsFacadeInterface |
||
1227 | { |
||
1228 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_OMS); |
||
1229 | } |
||
1230 | |||
1231 | /** |
||
1232 | * @return \Spryker\Zed\Messenger\Business\MessengerFacadeInterface |
||
1233 | */ |
||
1234 | public function getMessengerFacade(): MessengerFacadeInterface |
||
1235 | { |
||
1236 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_MESSENGER); |
||
1237 | } |
||
1238 | |||
1239 | /** |
||
1240 | * @return array<\SprykerFeature\Zed\SelfServicePortal\Dependency\Plugin\SspAssetManagementExpanderPluginInterface> |
||
1241 | */ |
||
1242 | public function getSspAssetManagementExpanderPlugins(): array |
||
1243 | { |
||
1244 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::PLUGINS_SSP_ASSET_MANAGEMENT_EXPANDER); |
||
1245 | } |
||
1246 | |||
1247 | /** |
||
1248 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Asset\Deleter\SspAssetManagementFileDeleterInterface |
||
1249 | */ |
||
1250 | public function createSspAssetManagementFileDeleter(): SspAssetManagementFileDeleterInterface |
||
1251 | { |
||
1252 | return new SspAssetManagementFileDeleter( |
||
1253 | $this->createSspAssetReader(), |
||
1254 | $this->createSspAssetWriter(), |
||
1255 | $this->getEntityManager(), |
||
1256 | ); |
||
1257 | } |
||
1258 | |||
1259 | /** |
||
1260 | * @return \SprykerFeature\Zed\SelfServicePortal\Business\Service\Expander\OrderItemCancellableExpanderInterface |
||
1261 | */ |
||
1262 | public function createOrderItemCancellableExpander(): OrderItemCancellableExpanderInterface |
||
1263 | { |
||
1264 | return new OrderItemCancellableExpander( |
||
1265 | $this->getOmsFacade(), |
||
1266 | ); |
||
1267 | } |
||
1268 | |||
1269 | /** |
||
1270 | * @return \Spryker\Zed\Mail\Business\MailFacadeInterface |
||
1271 | */ |
||
1272 | public function getMailFacade(): MailFacadeInterface |
||
1275 | } |
||
1276 | |||
1277 | /** |
||
1278 | * @return \Spryker\Zed\Customer\Business\CustomerFacadeInterface |
||
1279 | */ |
||
1280 | public function getCustomerFacade(): CustomerFacadeInterface |
||
1281 | { |
||
1282 | return $this->getProvidedDependency(SelfServicePortalDependencyProvider::FACADE_CUSTOMER); |
||
1283 | } |
||
1284 | } |
||
1285 |