Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
OrderCustomerDelegate.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
14 
21 {
25  private $customerExtractor;
26 
30  private $delegateService;
31 
36  public function __construct(
37  OrderCustomerExtractor $customerExtractor,
38  AccountDelegationInterface $delegateService
39  ) {
40  $this->customerExtractor = $customerExtractor;
41  $this->delegateService = $delegateService;
42  }
43 
47  public function delegateNew(int $orderId): Redirect
48  {
49  return $this->delegateService->createRedirectForNew(
50  $this->customerExtractor->extract($orderId),
51  ['__sales_assign_order_id' => $orderId]
52  );
53  }
54 }
__construct(OrderCustomerExtractor $customerExtractor, AccountDelegationInterface $delegateService)