public function SubrequestsTree::stack in Subrequests 8.2
Same name and namespace in other branches
- 3.x src/SubrequestsTree.php \Drupal\subrequests\SubrequestsTree::stack()
Adds a sequence of subrequests to the stack.
Parameters
\Drupal\subrequests\Subrequest[] $subrequests:
File
- src/
SubrequestsTree.php, line 24
Class
- SubrequestsTree
- Value class that holds the execution tree.
Namespace
Drupal\subrequestsCode
public function stack($subrequests) {
// Make sure we only push Subrequest objects.
$this
->append(array_filter($subrequests, function ($subrequest) {
return $subrequest instanceof Subrequest;
}));
}