public function isMainRequest();
/** * Adds the argument namespace of the current request to the specified arguments. * This happens recursively iterating through the nested requests in case of a subrequest. * For example if this is executed inside a widget sub request in a plugin sub request, the result would be: * array( * 'pluginRequestNamespace' => array( * 'widgetRequestNamespace => $arguments * ) * ) * * @param array $arguments arguments * @param RequestInterface $currentRequest * @return array arguments with namespace */ protected function addNamespaceToArguments(array $arguments, RequestInterface $currentRequest) { while (!$currentRequest->isMainRequest()) { $argumentNamespace = $currentRequest->getArgumentNamespace(); if ($argumentNamespace !== '') { $arguments = [$argumentNamespace => $arguments]; } $currentRequest = $currentRequest->getParentRequest(); } return $arguments; }