Product Manager. Allow to create and list products on a site. Create dynamical attributes for products. Filter by categories and attributes
11
stars
13
forks
source link
[FEATURE] Add direct accessors for attribute value #291
Closed
mabolek closed 3 years ago
New Pull Request checklist
PR Type
What kind of change does this PR introduce?
Breaking change
Does this PR introduce a breaking change?
Description
Introduces methods in the
Product
class:getAttributeValueForAttribute(Attribute $attribute)
which returns anAttributeValue
for the attribute type$attribute
ornull
if such does not exist.hasAttributeValueForAttribute(Attribute $attribute)
returns true if the product has anAttributeValue
for the attribute type$attribute
.Also internalizes
AttributeValue
mapping in theAttributeValue
class. This should not have been handled in theProduct
class.