delegateService = $customerDelegation; $this->session = $session; } /** * {@inheritdoc} */ public function execute() { /** @var string|null $orderId */ $orderId = $this->session->getLastOrderId(); if (!$orderId) { return $this->resultRedirectFactory->create()->setPath('/'); } return $this->delegateService->delegateNew((int)$orderId); } }