Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 36a8d72

Browse files
authored
Merge pull request #8438 from RakeshJesadiya/patch-101
Update array-manager.md
2 parents 62f7917 + c8a168e commit 36a8d72

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

src/guides/v2.3/extension-dev-guide/framework/array-manager.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ The library is primarily used to handle data from UI components within [DataProv
1313
|Method|Description|
1414
|--- |--- |
1515
| `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. |
1719
| `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. |
1923
| `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. |
2126

2227
### Example 1
2328

@@ -129,3 +134,13 @@ if ($this->arrayManager->get('response/status', $data) === 'OK') {
129134

130135
...
131136
```
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+
```

0 commit comments

Comments
 (0)