public function SubrequestsTree::allIds in Subrequests 3.x
Same name and namespace in other branches
- 8.2 src/SubrequestsTree.php \Drupal\subrequests\SubrequestsTree::allIds()
Gets all the subrequest IDs.
Return value
\Drupal\subrequests\Subrequest[] All the subrequests in all levels.
File
- src/
SubrequestsTree.php, line 76
Class
- SubrequestsTree
- Value class that holds the execution tree.
Namespace
Drupal\subrequestsCode
public function allIds() {
$subrequests = [];
foreach ($this as $item) {
$subrequests = array_merge($subrequests, array_values($item));
}
$all_request_ids = array_map(function (Subrequest $subrequest) {
return $subrequest->requestId;
}, $subrequests);
array_unshift($all_request_ids, '<ROOT>');
return array_unique($all_request_ids);
}