From 0a232d6136ee1e2975ad1e6f491ba2117ae16eaf Mon Sep 17 00:00:00 2001 From: Dinesh V B Date: Wed, 18 Nov 2020 12:54:14 +0530 Subject: [PATCH] issue-2916-rebased to master branch --- .../extension_attributes/adding-attributes.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/guides/v2.3/extension-dev-guide/extension_attributes/adding-attributes.md b/src/guides/v2.3/extension-dev-guide/extension_attributes/adding-attributes.md index a38bb3103af..57bec8ae229 100644 --- a/src/guides/v2.3/extension-dev-guide/extension_attributes/adding-attributes.md +++ b/src/guides/v2.3/extension-dev-guide/extension_attributes/adding-attributes.md @@ -175,7 +175,9 @@ Now we need to bind our plugin to `ProductInterface`: ## Extension Attributes Configuration: -For scalar attributes we can use next configuration: +The file that holds these extension attributes must reside under the `/etc` folder of your module. + +For scalar attributes, we can use the following configuration: ```xml @@ -186,6 +188,8 @@ For scalar attributes we can use next configuration: ``` +Here, the scalar attributes indicate the simple form of attribute representation, such as an integer or a string. Specify the class or interface of the extension attributes inside the "for" attribute of the `` tag. In this case, it is the ProductInterface. The attribute is specified with a unique code and its type. + For non-scalar attributes: ```xml @@ -196,6 +200,8 @@ For non-scalar attributes: ``` +Here, the non-scalar attributes indicate data objects such as the instance of a class. In the above example, the CustomDataInterface object is added as an extension attribute. + For array extension attributes: ```xml @@ -206,6 +212,8 @@ For array extension attributes: ``` +The array extension attributes are just an extension of the scalar attributes where a range of values can be represented as an attribute. The `[]` symbol indicates the attribute type is an array. + The array indicator `[]` can also be appended to non-scalar types. In first - scalar - case we will get the next result: