67 private $scopeOverriddenValue;
82 \
Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory,
135 $this->_lockedAttributes = [];
146 return array_keys($this->_lockedAttributes);
156 return !empty($this->_lockedAttributes);
187 if (is_array($key)) {
200 return parent::setData($key,
$value);
219 return parent::unsetData($key);
230 $collection = parent::getResourceCollection()->setStoreId($this->getStoreId());
245 $additionalAttributes
246 )->addAttributeToFilter(
267 return $this->_storeManager->getStore($this->getStoreId());
277 return $this->
getStore()->getWebsite()->getStoreIds(
true);
304 private function getAttributeScopeOverriddenValue()
306 if ($this->scopeOverriddenValue ===
null) {
308 ->get(\
Magento\Catalog\Model\Attribute\ScopeOverriddenValue::class);
310 return $this->scopeOverriddenValue;
323 if ($this->_defaultValues ===
null) {
327 ][$this->
getResource()->getEntityType()->getEntityTypeCode()];
328 $this->_defaultValues = $this->getAttributeScopeOverriddenValue()->getDefaultValues(
$entityType, $this);
360 if ($this->_storeValuesFlags ===
null) {
364 ][$this->
getResource()->getEntityType()->getEntityTypeCode()];
365 return $this->getAttributeScopeOverriddenValue()->containsValue(
373 return array_key_exists(
$attributeCode, $this->_storeValuesFlags);
384 return parent::beforeSave();
405 $this->_isDeleteable = (bool)
$value;
427 $this->_isReadonly = (bool)
$value;
__construct(\Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, AttributeValueFactory $customAttributeFactory, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Model\ResourceModel\AbstractResource $resource=null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection=null, array $data=[])
elseif(isset( $params[ 'redirect_parent']))
setData($key, $value=null)
setExistsStoreValueFlag($attributeCode)
setAttributeDefaultValue($attributeCode, $value)
getAttributeDefaultValue($attributeCode)
lockAttribute($attributeCode)
unlockAttribute($attributeCode)
isLockedAttribute($attributeCode)
loadByAttribute($attribute, $value, $additionalAttributes=' *')
getExistsStoreValueFlag($attributeCode)