Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ProductHelper {
- public getAllAttributeValues(Product product): array
- { return ['attribute1' => 'value1', 'attribute2' => ['tag1', 'tag2'], ...}
- getOptionalAttributeValues(Product product): array //why?
- { return ['key' => ['value',..], ...] }
- public getAttributeValueScalar(Product product, String attributeName, String delimiter): string
- {
- return 'tag1, tag2'; //or
- return 'value';
- }
- public getAttributeValueArray(Product product, String attributeName): array
- {
- return ['tag1', 'tag2']; //or
- return ['value'];
- }
- getOneOptionalAttribute(Product product) //why?
- { return ['key' => ['value',..]] }
- public getAnyAttribute(Product product, array attributes) //is there a use case?
- { return ['key' => value, ...] }
- getAnyOptionalAttribute(Product product, array attributes) //why?
- { return ['key' => ['value',..], ...] }
- getOptinalAttributeAsString(Product product, String delimiter) //see above
- { return attribute . delimeter . ... }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement