6 declare(strict_types=1);
25 private $attributeCode;
46 return $this->getAttribute()->getIsFilterable() || $this->getAttribute()->getIsFilterableInSearch();
56 return $this->getAttribute()->getIsSearchable()
57 || ($this->getAttribute()->getIsVisibleInAdvancedSearch()
69 $alwaysIndexableAttributes = [
74 return in_array($this->
getAttributeCode(), $alwaysIndexableAttributes,
true);
84 return in_array($this->getAttribute()->getBackendType(), [
'timestamp',
'datetime'],
true);
94 return $this->getAttribute()->getBackendType() ===
'decimal';
104 return in_array($this->getAttribute()->getBackendType(), [
'int',
'smallint'],
true);
114 return in_array($this->getAttribute()->
getFrontendInput(), [
'select',
'boolean'],
true)
115 && $this->getAttribute()->getBackendType() !==
'varchar';
125 return in_array($this->getAttribute()->
getFrontendInput(), [
'select',
'multiselect'],
true)
126 || $this->getAttribute()->usesSource();
136 return $this->getAttribute() instanceof \Magento\Eav\Api\Data\AttributeInterface;
146 return $this->attributeCode;
156 return $this->getAttribute()->getIsUserDefined();
166 return $this->getAttribute()->getFrontendInput();
176 return $this->attribute;
__construct(CustomAttributesDataInterface $attribute, string $attributeCode)