Neos\Flow\Mvc\Controller\AbstractController::forward PHP Метод

forward() защищенный Метод

Request is directly transferred to the other action / controller
См. также: redirect()
protected forward ( string $actionName, string $controllerName = null, string $packageKey = null, array $arguments = [] ) : void
$actionName string Name of the action to forward to
$controllerName string Unqualified object name of the controller to forward to. If not specified, the current controller is used.
$packageKey string Key of the package containing the controller to forward to. May also contain the sub package, concatenated with backslash (Vendor.Foo\Bar\Baz). If not specified, the current package is assumed.
$arguments array Arguments to pass to the target action
Результат void
    protected function forward($actionName, $controllerName = null, $packageKey = null, array $arguments = [])
    {
        $nextRequest = clone $this->request;
        $nextRequest->setControllerActionName($actionName);
        if ($controllerName !== null) {
            $nextRequest->setControllerName($controllerName);
        }
        if ($packageKey !== null && strpos($packageKey, '\\') !== false) {
            list($packageKey, $subpackageKey) = explode('\\', $packageKey, 2);
        } else {
            $subpackageKey = null;
        }
        if ($packageKey !== null) {
            $nextRequest->setControllerPackageKey($packageKey);
            $nextRequest->setControllerSubpackageKey($subpackageKey);
        }
        $regularArguments = [];
        foreach ($arguments as $argumentName => $argumentValue) {
            if (substr($argumentName, 0, 2) === '__') {
                $nextRequest->setArgument($argumentName, $argumentValue);
            } else {
                $regularArguments[$argumentName] = $argumentValue;
            }
        }
        $nextRequest->setArguments($this->persistenceManager->convertObjectsToIdentityArrays($regularArguments));
        $this->arguments->removeAll();
        $forwardException = new ForwardException();
        $forwardException->setNextRequest($nextRequest);
        throw $forwardException;
    }