You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: guides/v2.1/extension-dev-guide/attributes.md
+10-54Lines changed: 10 additions & 54 deletions
Original file line number
Diff line number
Diff line change
@@ -113,60 +113,16 @@ You must create a `<Module>/etc/extension_attributes.xml` file to define a modul
113
113
114
114
where:
115
115
116
-
<table>
117
-
<thead>
118
-
<th>Keyword</th>
119
-
<th>Description</th>
120
-
<th>Example</th>
121
-
</thead>
122
-
<tbody>
123
-
<tr>
124
-
<td><p>for</p></td>
125
-
<td><p>The fully-qualified type name with the [namespace](https://glossary.magento.com/namespace) that processes the extensions. The value must be a type that implements `ExtensibleDataInterface`. The interface can be in a different module.</p> </td>
<td><p>The name of the attribute. The attribute name should be in snake case (the first letter in each word should be in lowercase, with each word separated by an underscore). </p></td>
131
-
<td><code>gift_cards_amount_used</code></td>
132
-
</tr>
133
-
<tr>
134
-
<td><p>type</p></td>
135
-
<td><p>The data type. This can be a simple data type, such as string or integer, or complex type, such as an interface.</p></td>
<td><p>Optional. Restricts access to the [extension attribute](https://glossary.magento.com/extension-attribute) to users with the specified permission.</p></td>
<p>The table involved in a join operation. See <ahref="#search">Searching extension attributes</a> for details.</p>
147
-
</td>
148
-
<td><code>admin_user</code></td>
149
-
</tr>
150
-
<tr>
151
-
<td><p>reference_field</p></td>
152
-
<td><p>Column in the reference_table</p></td>
153
-
<td><code>user_id</code></td>
154
-
</tr>
155
-
<tr>
156
-
<td><p>join_on_field</p></td>
157
-
<td><p>The column of the table associated with the interface specified in the <code>for</code> [keyword](https://glossary.magento.com/keyword) that will be used in the join operation.</p></td>
158
-
<td><code>store_id</code></td>
159
-
</tr>
160
-
<tr>
161
-
<td><p>field</p></td>
162
-
<td><p>One or more fields present in the interface specified in the <code>type</code> keyword.</p>
163
-
<p>You can specify the <code>column=""</code> keyword to define the column in the reference_table to use. The field value specifies the property on the <code>interface</code> which should be set.</p></td>
| for | The fully-qualified type name with the [namespace](https://glossary.magento.com/namespace) that processes the extensions. The value must be a type that implements `ExtensibleDataInterface`. The interface can be in a different module. |`Magento\Quote\Api\Data\TotalsInterface`|
119
+
| code | The name of the attribute. The attribute name should be in snake case (the first letter in each word should be in lowercase, with each word separated by an underscore). |`gift_cards_amount_used`|
120
+
| type | The data type. This can be a simple data type, such as string or integer, or complex type, such as an interface. |`float`<br />`Magento\CatalogInventory\Api\Data\StockItemInterface`|
121
+
| ref | Optional. Restricts access to the extension attribute to users with the specified permission. |`Magento_CatalogInventory::cataloginventory`|
122
+
| reference_table | The table involved in a join operation. See [Searching extension attributes](#search) for details. |`admin_user`|
123
+
| reference_field | Column in the `reference_table`. |`user_id`|
124
+
| join_on_field | The column of the table associated with the interface specified in the `for` keyword that will be used in the join operation. |`store_id`|
125
+
| field | One or more fields present in the interface specified in the `type` keyword.<br />You can specify the `column=""` keyword to define the column in the reference_table to use. The field value specifies the property on the `interface` which should be set. |`<field>firstname</field>`<br />`<field>lastname</field>`<br />`<field>email</field>`<br /><br />`<field column="customer_group_code">code</field>`|
0 commit comments