-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Issue-2916- Provide more info about file/classes in code snippets to adding-attributes.html #8218
Issue-2916- Provide more info about file/classes in code snippets to adding-attributes.html #8218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue indicates there are a lot more problems with the concerned page than are covered by this PR - will you be adding more? What's the plan?
@@ -186,6 +188,8 @@ For scalar attributes we can use next configuration: | |||
</config> | |||
``` | |||
|
|||
Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with an unique code and it's type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(a unique is correct as unique starts with a consonant sound)
Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with an unique code and it's type. | |
Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with a unique code and its type. |
@@ -206,6 +212,8 @@ For array extension attributes: | |||
</config> | |||
``` | |||
|
|||
The array extension attributes are just an extension of the scalar attributes where a range of values can be represented as an attribute. `[]` symbol is used to indicate the type of the attribute as array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The array extension attributes are just an extension of the scalar attributes where a range of values can be represented as an attribute. `[]` symbol is used to indicate the type of the attribute as array. | |
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 is used to indicate the type of the attribute as an array. |
Hi @BarnyShergold , I went through the https://devdocs.magento.com/guides/v2.4/extension-dev-guide/extension_attributes/adding-attributes.html page and after I got an understanding of the issue specified, I made these changes. I don't know how to proceed hereafter. I would like to have some suggestions. Can you assist me with this? |
@shrielenee - Some additional information to the section on your issue has been added by @dineshvb - Textually the additions are fine, can you take a look and feedback as to if there is enough new information or what might else be needed to clarify the examples as indicated in you report? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some grammatical changes.
@@ -175,6 +175,8 @@ Now we need to bind our plugin to `ProductInterface`: | |||
|
|||
## Extension Attributes Configuration: | |||
|
|||
The file which holds these extension attributes must reside under the /etc folder of your module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file which holds these extension attributes must reside under the /etc folder of your module. | |
The file that holds these extension attributes must reside under the `/etc` folder of your module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change line 180 to "For scalar attributes, we can use the following configuration:"
@@ -186,6 +188,8 @@ For scalar attributes we can use next configuration: | |||
</config> | |||
``` | |||
|
|||
Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with a unique code and its type. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, the scalar attributes indicate the simple form of attribute representation such as an Integer or a String. The class or interface for which the extension attributes must be added is specified inside the "for" attribute of the `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with a unique code and its type. | |
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 `<extension_attributes>` tag. In this case, it is the ProductInterface. The attribute is specified with a unique code and its type. |
@@ -206,6 +212,8 @@ For array extension attributes: | |||
</config> | |||
``` | |||
|
|||
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 is used to indicate the type of the attribute as an array. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 is used to indicate the type of the attribute as an array. | |
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. |
3bb235a
to
0a232d6
Compare
@keharper @BarnyShergold @dobooth Changed the base to master |
Agree with all @keharper comments. Thanks y'all! |
@shrielenee As @BarnyShergold said, I would like feedback on my changes so that I could proceed further |
Looks good so far. |
running tests |
Hi @dineshvb, thank you for your contribution! |
Purpose of this pull request
This pull request (PR) fixes #2916
Affected DevDocs pages