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-agreements
Model
AgreementsValidator.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\CheckoutAgreements\Model
;
7
11
class
AgreementsValidator
implements
\Magento\Checkout\Api\AgreementsValidatorInterface
12
{
16
protected
$agreementsProviders
;
17
22
public
function
__construct
($list =
null
)
23
{
24
$this->agreementsProviders = (array) $list;
25
}
26
33
public
function
isValid
($agreementIds = [])
34
{
35
$agreementIds = $agreementIds ===
null
? [] : $agreementIds;
36
$requiredAgreements = [];
37
foreach
($this->agreementsProviders as $agreementsProvider) {
38
$requiredAgreements = array_merge($requiredAgreements, $agreementsProvider->getRequiredAgreementIds());
39
}
40
$agreementsDiff = array_diff($requiredAgreements, $agreementIds);
41
return
empty($agreementsDiff);
42
}
43
}
Magento\CheckoutAgreements\Model\AgreementsValidator\__construct
__construct($list=null)
Definition:
AgreementsValidator.php:22
Magento\CheckoutAgreements\Model\AgreementsValidator\$agreementsProviders
$agreementsProviders
Definition:
AgreementsValidator.php:16
Magento\CheckoutAgreements\Model\AgreementsValidator\isValid
isValid($agreementIds=[])
Definition:
AgreementsValidator.php:33
Magento\Checkout\Api\AgreementsValidatorInterface
Definition:
AgreementsValidatorInterface.php:13
Magento\CheckoutAgreements\Model\AgreementsValidator
Definition:
AgreementsValidator.php:11
Magento\CheckoutAgreements\Model