This repository was archived by the owner on Nov 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
src/guides/v2.3/extension-dev-guide/framework Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,16 @@ The library is primarily used to handle data from UI components within [DataProv
13
13
| Method| Description|
14
14
| --- | --- |
15
15
| ` exists ` | Checks if the node exists in a given associative array |
16
- | ` get ` | Returns the value of the key (or node) at the end of the path, ` null ` is returned if the node hasn't been found. |
16
+ | ` find ` | Finds a node in a nested array and saves its index and parent node reference |
17
+ | ` findPaths ` | Gets matching paths for elements with specified indexes. |
18
+ | ` get ` | Returns the value of the key (or node) at the end of the path. ` null ` is returned if the node could not be found. |
17
19
| ` move ` | Moves a value from one path to another |
18
- | ` remove ` | Removes node and returns modified array |
20
+ | ` merge ` | Merges a value with a node and returns the modified data. |
21
+ | ` populate ` | Populates a nested array, if possible and necessary. |
22
+ | ` remove ` | Removes a node and returns the modified array. |
19
23
| ` replace ` | Updates the existing nodes and returns the modified array |
20
- | ` set ` | Set value into node and returns modified data |
24
+ | ` set ` | Sets the value into a node and returns modified data. |
25
+ | ` slicePath ` | Retrieves a slice of the specified path. |
21
26
22
27
### Example 1
23
28
@@ -129,3 +134,13 @@ if ($this->arrayManager->get('response/status', $data) === 'OK') {
129
134
130
135
...
131
136
```
137
+
138
+ You can use the ` Magento\Framework\Stdlib\ArrayManager ` library to populate an array from the given path:
139
+
140
+ ``` php
141
+ ...
142
+
143
+ $this->arrayManager->populate('response/result/items', $data)
144
+
145
+ ...
146
+ ```
You can’t perform that action at this time.
0 commit comments