public function BlueprintManager::parse in Subrequests 8.2
Same name and namespace in other branches
- 3.x src/Blueprint/BlueprintManager.php \Drupal\subrequests\Blueprint\BlueprintManager::parse()
Takes the user input and returns a subrequest tree ready for execution.
Parameters
string $input: The input from the user.
Return value
\Drupal\subrequests\SubrequestsTree
File
- src/
Blueprint/ BlueprintManager.php, line 33
Class
Namespace
Drupal\subrequests\BlueprintCode
public function parse($input, Request $request) {
/** @var \Drupal\subrequests\SubrequestsTree $output */
$output = $this->serializer
->deserialize($input, SubrequestsTree::class, 'json');
$output
->setMasterRequest($request);
// Forward the Host header to place nice with decoupled routers.
$this
->forwardHeader('host', $request, $output);
return $output;
}