13 class Properties extends \Magento\Framework\Validator\AbstractValidator
28 $this->_readOnlyProperties = $readOnlyProperties;
45 throw new \InvalidArgumentException(
'Instance of \Magento\Framework\Model\AbstractModel is expected.');
47 if ($this->_readOnlyProperties) {
48 if (!
$value->hasDataChanges()) {
51 foreach ($this->_readOnlyProperties as $property) {
53 $this->_messages[__CLASS__] = [
54 (string)
new \
Magento\Framework\
Phrase(
"Read-only property cannot be changed.")
60 return !count($this->_messages);
72 if ($firstValue === $secondValue || $firstValue == $secondValue && is_numeric(
_hasChanges($firstValue, $secondValue)
setReadOnlyProperties(array $readOnlyProperties)