Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-checkout
Controller
Account
DelegateCreate.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Checkout\Controller\Account
;
9
10
use
Magento\Framework\App\Action\HttpGetActionInterface
as HttpGetActionInterface;
11
use
Magento\Framework\App\Action\Action
;
12
use
Magento\Framework\App\Action\Context
;
13
use
Magento\Checkout\Model\Session
;
14
use
Magento\Sales\Api\OrderCustomerDelegateInterface
;
15
19
class
DelegateCreate
extends
Action
implements HttpGetActionInterface
20
{
24
private
$delegateService;
25
29
private
$session;
30
36
public
function
__construct
(
37
Context
$context,
38
OrderCustomerDelegateInterface
$customerDelegation,
39
Session
$session
40
) {
41
parent::__construct($context);
42
$this->delegateService = $customerDelegation;
43
$this->session =
$session
;
44
}
45
49
public
function
execute
()
50
{
52
$orderId = $this->session->getLastOrderId();
53
if
(!$orderId) {
54
return
$this->resultRedirectFactory->create()->setPath(
'/'
);
55
}
56
57
return
$this->delegateService->delegateNew((
int
)$orderId);
58
}
59
}
Magento\Checkout\Controller\Account\DelegateCreate
Definition:
DelegateCreate.php:19
Magento\Framework\App\Action\HttpGetActionInterface
Definition:
HttpGetActionInterface.php:16
Magento\Checkout\Model\Session
Definition:
SuccessValidator.php:6
$session
$session
Definition:
quote_with_configurable_product_last_variation.php:62
Magento\Framework\App\ActionInterface\execute
execute()
Magento\Sales\Api\OrderCustomerDelegateInterface
Definition:
OrderCustomerDelegateInterface.php:15
Magento\Checkout\Controller\Account
Definition:
Create.php:6
Magento\Checkout\Controller\Account\DelegateCreate\__construct
__construct(Context $context, OrderCustomerDelegateInterface $customerDelegation, Session $session)
Definition:
DelegateCreate.php:36
Magento\Checkout\Model\Session
Definition:
Session.php:17
Magento\Framework\App\Action\Context
Definition:
Context.php:24
Magento\Framework\App\Action\Action
Definition:
Action.php:25