You are here

public function RequestTree::isDone in Subrequests 8

Is the request tree done?

Return value

bool TRUE if all the requests in the tree and it's descendants are done.

File

src/Blueprint/RequestTree.php, line 131

Class

RequestTree
Contains the hierarchical information of the requests.

Namespace

Drupal\subrequests\Blueprint

Code

public function isDone() {

  // The tree is done if all of the requests and their children are done.
  return array_reduce($this
    ->getRequests(), function ($is_done, Request $request) {
    return $is_done && static::isRequestDone($request);
  }, TRUE);
}