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-quote
Model
QuoteIdToMaskedQuoteId.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Quote\Model
;
9
10
use
Magento\Quote\Api\CartRepositoryInterface
;
11
12
class
QuoteIdToMaskedQuoteId
implements
QuoteIdToMaskedQuoteIdInterface
13
{
17
private
$quoteIdMaskFactory;
18
22
private
$cartRepository;
23
28
public
function
__construct
(
29
QuoteIdMaskFactory $quoteIdMaskFactory,
30
CartRepositoryInterface
$cartRepository
31
) {
32
$this->quoteIdMaskFactory = $quoteIdMaskFactory;
33
$this->cartRepository =
$cartRepository
;
34
}
35
39
public
function
execute
(
int
$quoteId
): string
40
{
41
/* Check the quote exists to avoid database constraint issues */
42
$this->cartRepository->get(
$quoteId
);
43
44
$quoteIdMask
= $this->quoteIdMaskFactory->create();
45
$quoteIdMask
->setQuoteId(
$quoteId
)->save();
46
47
return
$quoteIdMask
->getMaskedId();
48
}
49
}
Magento\Quote\Model\QuoteIdToMaskedQuoteIdInterface
Definition:
QuoteIdToMaskedQuoteIdInterface.php:16
$quoteIdMask
$quoteIdMask
Definition:
quote_with_bundle_and_options_rollback.php:22
$cartRepository
$cartRepository
Definition:
quote.php:18
Magento\Quote\Model
Definition:
MaskedQuoteIdToQuoteIdTest.php:8
Magento\Quote\Model\QuoteIdToMaskedQuoteId
Definition:
QuoteIdToMaskedQuoteId.php:12
Magento\Quote\Api\CartRepositoryInterface
Definition:
CartRepositoryInterface.php:13
Magento\Quote\Model\QuoteIdToMaskedQuoteId\__construct
__construct(QuoteIdMaskFactory $quoteIdMaskFactory, CartRepositoryInterface $cartRepository)
Definition:
QuoteIdToMaskedQuoteId.php:28
Magento\Quote\Model\QuoteIdToMaskedQuoteId\execute
execute(int $quoteId)
Definition:
QuoteIdToMaskedQuoteId.php:39
$quoteId
$quoteId
Definition:
quote_with_items_and_custom_options_saved_rollback.php:12