Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Data Fields | |
const | MODULE_NAME = 'Magento_Catalog' |
const | ENTITY = 'catalog_eav_attribute' |
const | KEY_IS_GLOBAL = 'is_global' |
![]() | |
const | ATTRIBUTE_CODE_MAX_LENGTH = 60 |
const | ATTRIBUTE_CODE_MIN_LENGTH = 1 |
const | CACHE_TAG = 'EAV_ATTRIBUTE' |
![]() | |
const | TYPE_STATIC = 'static' |
const | EMPTY_STRING = '' |
![]() | |
const | CUSTOM_ATTRIBUTES = 'custom_attributes' |
![]() | |
const | EXTENSION_ATTRIBUTES_KEY = 'extension_attributes' |
![]() | |
const | ATTRIBUTE_ID = 'attribute_id' |
const | IS_UNIQUE = 'is_unique' |
const | SCOPE = 'scope' |
const | FRONTEND_CLASS = 'frontend_class' |
const | ATTRIBUTE_CODE = 'attribute_code' |
const | FRONTEND_INPUT = 'frontend_input' |
const | IS_REQUIRED = 'is_required' |
const | OPTIONS = 'options' |
const | IS_USER_DEFINED = 'is_user_defined' |
const | FRONTEND_LABEL = 'frontend_label' |
const | FRONTEND_LABELS = 'frontend_labels' |
const | NOTE = 'note' |
const | BACKEND_TYPE = 'backend_type' |
const | BACKEND_MODEL = 'backend_model' |
const | SOURCE_MODEL = 'source_model' |
const | VALIDATE_RULES = 'validate_rules' |
const | ENTITY_TYPE_ID = 'entity_type_id' |
![]() | |
const | ENTITY_TYPE_CODE = 'catalog_product' |
const | CODE_HAS_WEIGHT = 'product_has_weight' |
const | CODE_SPECIAL_PRICE = 'special_price' |
const | CODE_PRICE = 'price' |
const | CODE_TIER_PRICE_FIELD_PRICE_QTY = 'price_qty' |
const | CODE_SHORT_DESCRIPTION = 'short_description' |
const | CODE_SEO_FIELD_META_TITLE = 'meta_title' |
const | CODE_STATUS = 'status' |
const | CODE_NAME = 'name' |
const | CODE_SKU = 'sku' |
const | CODE_SEO_FIELD_META_KEYWORD = 'meta_keyword' |
const | CODE_DESCRIPTION = 'description' |
const | CODE_COST = 'cost' |
const | CODE_SEO_FIELD_URL_KEY = 'url_key' |
const | CODE_TIER_PRICE = 'tier_price' |
const | CODE_TIER_PRICE_FIELD_PRICE = 'price' |
const | CODE_TIER_PRICE_FIELD_PERCENTAGE_VALUE = 'percentage_value' |
const | CODE_TIER_PRICE_FIELD_VALUE_TYPE = 'value_type' |
const | CODE_SEO_FIELD_META_DESCRIPTION = 'meta_description' |
const | CODE_WEIGHT = 'weight' |
![]() | |
const | IS_WYSIWYG_ENABLED = 'is_wysiwyg_enabled' |
const | IS_HTML_ALLOWED_ON_FRONT = 'is_html_allowed_on_front' |
const | USED_FOR_SORT_BY = 'used_for_sort_by' |
const | IS_FILTERABLE = 'is_filterable' |
const | IS_FILTERABLE_IN_SEARCH = 'is_filterable_in_search' |
const | IS_USED_IN_GRID = 'is_used_in_grid' |
const | IS_VISIBLE_IN_GRID = 'is_visible_in_grid' |
const | IS_FILTERABLE_IN_GRID = 'is_filterable_in_grid' |
const | POSITION = 'position' |
const | APPLY_TO = 'apply_to' |
const | IS_SEARCHABLE = 'is_searchable' |
const | IS_VISIBLE_IN_ADVANCED_SEARCH = 'is_visible_in_advanced_search' |
const | IS_COMPARABLE = 'is_comparable' |
const | IS_USED_FOR_PROMO_RULES = 'is_used_for_promo_rules' |
const | IS_VISIBLE_ON_FRONT = 'is_visible_on_front' |
const | USED_IN_PRODUCT_LISTING = 'used_in_product_listing' |
const | IS_VISIBLE = 'is_visible' |
const | SCOPE_STORE_TEXT = 'store' |
const | SCOPE_GLOBAL_TEXT = 'global' |
const | SCOPE_WEBSITE_TEXT = 'website' |
![]() | |
const | SCOPE_STORE = 0 |
const | SCOPE_GLOBAL = 1 |
const | SCOPE_WEBSITE = 2 |
Static Protected Attributes | |
static | $_labels = null |
![]() | |
static | $_underscoreCache = [] |
Catalog attribute model
@api @method \Magento\Catalog\Model\ResourceModel\Eav\Attribute getFrontendInputRenderer() @method string setFrontendInputRenderer(string $value) @method int setIsGlobal(int $value) @method int getSearchWeight() @method int setSearchWeight(int $value) @method bool getIsUsedForPriceRules() @method int setIsUsedForPriceRules(int $value)
Definition at line 31 of file Attribute.php.
\Magento\Framework\Model\Context | $context | |
\Magento\Framework\Registry | $registry | |
\Magento\Framework\Api\ExtensionAttributesFactory | $extensionFactory | |
AttributeValueFactory | $customAttributeFactory | |
\Magento\Eav\Model\Config | $eavConfig | |
\Magento\Eav\Model\Entity\TypeFactory | $eavTypeFactory | |
\Magento\Store\Model\StoreManagerInterface | $storeManager | |
\Magento\Eav\Model\ResourceModel\Helper | $resourceHelper | |
\Magento\Framework\Validator\UniversalFactory | $universalFactory | |
\Magento\Eav\Api\Data\AttributeOptionInterfaceFactory | $optionDataFactory | |
\Magento\Framework\Reflection\DataObjectProcessor | $dataObjectProcessor | |
\Magento\Framework\Api\DataObjectHelper | $dataObjectHelper | |
\Magento\Framework\Stdlib\DateTime\TimezoneInterface | $localeDate | |
\Magento\Catalog\Model\Product\ReservedAttributeList | $reservedAttributeList | |
\Magento\Framework\Locale\ResolverInterface | $localeResolver | |
DateTimeFormatterInterface | $dateTimeFormatter | |
\Magento\Catalog\Model\Indexer\Product\Flat\Processor | $productFlatIndexerProcessor | |
\Magento\Catalog\Model\Indexer\Product\Eav\Processor | $indexerEavProcessor | |
\Magento\Catalog\Helper\Product\Flat\Indexer | $productFlatIndexerHelper | |
LockValidatorInterface | $lockValidator | |
\Magento\Framework\Model\ResourceModel\AbstractResource | null | $resource | |
\Magento\Framework\Data\Collection\AbstractDb | null | $resourceCollection | |
array | $data | |
\Magento\Eav\Api\Data\AttributeExtensionFactory | null | $eavAttributeFactory | @SuppressWarnings(PHPMD.ExcessiveParameterList) |
Definition at line 114 of file Attribute.php.
__sleep | ( | ) |
Definition at line 844 of file Attribute.php.
__wakeup | ( | ) |
Definition at line 857 of file Attribute.php.
|
protected |
_getDefaultSourceModel | ( | ) |
|
protected |
|
protected |
Is original attribute enabled for flat indexing
Definition at line 270 of file Attribute.php.
|
protected |
Is original attribute config indexable
Definition at line 465 of file Attribute.php.
afterDelete | ( | ) |
{}
Definition at line 834 of file Attribute.php.
afterDeleteCommit | ( | ) |
Init indexing process after catalog eav attribute delete commit
Definition at line 296 of file Attribute.php.
afterSave | ( | ) |
Processing object after save data
Fix saving attribute in admin
Definition at line 222 of file Attribute.php.
beforeDelete | ( | ) |
Register indexing event before delete catalog eav attribute
Definition at line 285 of file Attribute.php.
beforeSave | ( | ) |
Processing object before save data
Definition at line 184 of file Attribute.php.
getApplyTo | ( | ) |
Retrieve apply to products array Return empty array if applied to all products
Implements EavAttributeInterface.
Definition at line 369 of file Attribute.php.
getIndexType | ( | ) |
Retrieve index type for indexable attribute
Definition at line 497 of file Attribute.php.
getIsComparable | ( | ) |
{Whether the attribute can be compared on the frontend
Implements EavAttributeInterface.
Definition at line 601 of file Attribute.php.
getIsFilterable | ( | ) |
{Whether it used in layered navigation
Implements EavAttributeInterface.
Definition at line 537 of file Attribute.php.
getIsFilterableInGrid | ( | ) |
{Whether it is filterable in catalog product grid
Implements EavAttributeInterface.
Definition at line 569 of file Attribute.php.
getIsFilterableInSearch | ( | ) |
{Whether it is used in search results layered navigation
Implements EavAttributeInterface.
Definition at line 545 of file Attribute.php.
getIsGlobal | ( | ) |
getIsHtmlAllowedOnFront | ( | ) |
{Whether the HTML tags are allowed on the frontend
Implements EavAttributeInterface.
Definition at line 521 of file Attribute.php.
getIsSearchable | ( | ) |
{Whether the attribute can be used in Quick Search
Implements EavAttributeInterface.
Definition at line 585 of file Attribute.php.
getIsUsedForPromoRules | ( | ) |
{Whether the attribute can be used for promo rules
Implements EavAttributeInterface.
Definition at line 609 of file Attribute.php.
getIsUsedInGrid | ( | ) |
{Whether it is used in catalog product grid
Implements EavAttributeInterface.
Definition at line 553 of file Attribute.php.
getIsVisible | ( | ) |
{Whether attribute is visible on frontend.
Implements EavAttributeInterface.
Definition at line 633 of file Attribute.php.
getIsVisibleInAdvancedSearch | ( | ) |
{Whether the attribute can be used in Advanced Search
Implements EavAttributeInterface.
Definition at line 593 of file Attribute.php.
getIsVisibleInGrid | ( | ) |
{Whether it is visible in catalog product grid
Implements EavAttributeInterface.
Definition at line 561 of file Attribute.php.
getIsVisibleOnFront | ( | ) |
{Whether the attribute is visible on the frontend
Implements EavAttributeInterface.
Definition at line 617 of file Attribute.php.
getIsWysiwygEnabled | ( | ) |
@codeCoverageIgnoreStart {Enable WYSIWYG flag
Implements EavAttributeInterface.
Definition at line 513 of file Attribute.php.
getPosition | ( | ) |
{Get position
Implements EavAttributeInterface.
Definition at line 577 of file Attribute.php.
getScope | ( | ) |
{Retrieve attribute scope
Implements EavAttributeInterface.
Definition at line 643 of file Attribute.php.
getSourceModel | ( | ) |
Retrieve source model
Implements AttributeInterface.
Definition at line 383 of file Attribute.php.
getStoreId | ( | ) |
getUsedForSortBy | ( | ) |
{Whether it is used for sorting in product listing
Implements EavAttributeInterface.
Definition at line 529 of file Attribute.php.
getUsedInProductListing | ( | ) |
{Whether the attribute can be used in product listing
Implements EavAttributeInterface.
Definition at line 625 of file Attribute.php.
isAllowedForRuleCondition | ( | ) |
Whether allowed for rule condition
Definition at line 399 of file Attribute.php.
isEnabledInFlat | ( | ) |
Is attribute enabled for flat indexing
Definition at line 246 of file Attribute.php.
isIndexable | ( | ) |
Check is an attribute used in EAV index
Definition at line 431 of file Attribute.php.
isScopeGlobal | ( | ) |
Retrieve attribute is global scope flag
Definition at line 324 of file Attribute.php.
isScopeStore | ( | ) |
Retrieve attribute is store scope flag
Definition at line 344 of file Attribute.php.
isScopeWebsite | ( | ) |
Retrieve attribute is website scope website
Definition at line 334 of file Attribute.php.
setApplyTo | ( | $applyTo | ) |
Set apply to value for the element
string | []|string |
Implements EavAttributeInterface.
Definition at line 726 of file Attribute.php.
setIsComparable | ( | $isComparable | ) |
Set whether the attribute can be compared on the frontend
string | $isComparable |
Implements EavAttributeInterface.
Definition at line 762 of file Attribute.php.
setIsFilterable | ( | $isFilterable | ) |
Set whether it used in layered navigation
bool | $isFilterable |
Implements EavAttributeInterface.
Definition at line 693 of file Attribute.php.
setIsFilterableInGrid | ( | $isFilterableInGrid | ) |
Set is attribute filterable in grid
bool | null | $isFilterableInGrid |
Implements EavAttributeInterface.
Definition at line 893 of file Attribute.php.
setIsFilterableInSearch | ( | $isFilterableInSearch | ) |
Set whether it is used in search results layered navigation
bool | $isFilterableInSearch |
Implements EavAttributeInterface.
Definition at line 704 of file Attribute.php.
setIsHtmlAllowedOnFront | ( | $isHtmlAllowedOnFront | ) |
Set whether the HTML tags are allowed on the frontend
bool | $isHtmlAllowedOnFront |
Implements EavAttributeInterface.
Definition at line 671 of file Attribute.php.
setIsSearchable | ( | $isSearchable | ) |
Whether the attribute can be used in Quick Search
string | $isSearchable |
Implements EavAttributeInterface.
Definition at line 740 of file Attribute.php.
setIsUsedForPromoRules | ( | $isUsedForPromoRules | ) |
Set whether the attribute can be used for promo rules
string | $isUsedForPromoRules |
Implements EavAttributeInterface.
Definition at line 773 of file Attribute.php.
setIsUsedInGrid | ( | $isUsedInGrid | ) |
Set is attribute used in grid
bool | null | $isUsedInGrid |
Implements EavAttributeInterface.
Definition at line 873 of file Attribute.php.
setIsVisible | ( | $isVisible | ) |
Set whether attribute is visible on frontend.
bool | $isVisible |
Implements EavAttributeInterface.
Definition at line 806 of file Attribute.php.
setIsVisibleInAdvancedSearch | ( | $isVisibleInAdvancedSearch | ) |
Set whether the attribute can be used in Advanced Search
string | $isVisibleInAdvancedSearch |
Implements EavAttributeInterface.
Definition at line 751 of file Attribute.php.
setIsVisibleInGrid | ( | $isVisibleInGrid | ) |
Set is attribute visible in grid
bool | null | $isVisibleInGrid |
Implements EavAttributeInterface.
Definition at line 883 of file Attribute.php.
setIsVisibleOnFront | ( | $isVisibleOnFront | ) |
Set whether the attribute is visible on the frontend
string | $isVisibleOnFront |
Implements EavAttributeInterface.
Definition at line 784 of file Attribute.php.
setIsWysiwygEnabled | ( | $isWysiwygEnabled | ) |
Set whether WYSIWYG is enabled flag
bool | $isWysiwygEnabled |
Implements EavAttributeInterface.
Definition at line 660 of file Attribute.php.
setPosition | ( | $position | ) |
Set position
int | $position |
Implements EavAttributeInterface.
Definition at line 715 of file Attribute.php.
setScope | ( | $scope | ) |
Set attribute scope
string | $scope |
Implements EavAttributeInterface.
Definition at line 817 of file Attribute.php.
setUsedForSortBy | ( | $usedForSortBy | ) |
Set whether it is used for sorting in product listing
bool | $usedForSortBy |
Implements EavAttributeInterface.
Definition at line 682 of file Attribute.php.
setUsedInProductListing | ( | $usedInProductListing | ) |
Set whether the attribute can be used in product listing
string | $usedInProductListing |
Implements EavAttributeInterface.
Definition at line 795 of file Attribute.php.
|
protected |
Definition at line 51 of file Attribute.php.
|
protected |
Definition at line 65 of file Attribute.php.
|
protected |
Definition at line 80 of file Attribute.php.
|
staticprotected |
Definition at line 58 of file Attribute.php.
|
protected |
Definition at line 75 of file Attribute.php.
|
protected |
Definition at line 70 of file Attribute.php.
|
protected |
Definition at line 44 of file Attribute.php.
const ENTITY = 'catalog_eav_attribute' |
Definition at line 37 of file Attribute.php.
const KEY_IS_GLOBAL = 'is_global' |
Definition at line 39 of file Attribute.php.
const MODULE_NAME = 'Magento_Catalog' |
Definition at line 35 of file Attribute.php.