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-catalog
Model
Attribute
LockValidatorComposite.php
Go to the documentation of this file.
1
<?php
8
namespace
Magento\Catalog\Model\Attribute
;
9
10
class
LockValidatorComposite
implements
LockValidatorInterface
11
{
15
protected
$validators
= [];
16
22
public
function
__construct
(\
Magento
\Framework\
ObjectManagerInterface
$objectManager
, array
$validators
= [])
23
{
24
foreach
(
$validators
as $validator) {
25
if
(!
is_subclass_of
($validator, \
Magento
\Catalog\Model\Attribute\LockValidatorInterface::class)) {
26
throw
new \InvalidArgumentException($validator .
' does not implements LockValidatorInterface'
);
27
}
28
$this->validators[] =
$objectManager
->get($validator);
29
}
30
}
31
41
public
function
validate
(\
Magento
\Framework\Model\
AbstractModel
$object,
$attributeSet
=
null
)
42
{
43
foreach
($this->validators as $validator) {
44
$validator->validate($object,
$attributeSet
);
45
}
46
}
47
}
Magento\Catalog\Model\Attribute\LockValidatorComposite\validate
validate(\Magento\Framework\Model\AbstractModel $object, $attributeSet=null)
Definition:
LockValidatorComposite.php:41
Magento\Setup\Model\is_subclass_of
is_subclass_of($obj, $className)
Definition:
UninstallCollectorTest.php:98
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Catalog\Model\Attribute\LockValidatorInterface
Definition:
LockValidatorInterface.php:14
Magento
Magento\Catalog\Model\Attribute\LockValidatorComposite\$validators
$validators
Definition:
LockValidatorComposite.php:15
$attributeSet
$attributeSet
Definition:
attribute_set_with_image_attribute.php:11
Magento\Catalog\Model\Attribute\LockValidatorComposite\__construct
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, array $validators=[])
Definition:
LockValidatorComposite.php:22
Magento\Catalog\Model\AbstractModel
Definition:
AbstractModel.php:17
Magento\Catalog\Model\Attribute\LockValidatorComposite
Definition:
LockValidatorComposite.php:10
Magento\Catalog\Model\Attribute