FluidTYPO3\Vhs\ViewHelpers\Render\RequestViewHelper::render PHP Метод

render() публичный Метод

Dispatches (as a completely new Request) a Request that will execute a configured Plugin->Controller->action() which means that the Plugin, Controller and Action you use must be allowed by the plugin configuration of the target controller.
public render ( string | null $action = null, string | null $controller = null, string | null $extensionName = null, string | null $pluginName = null, string | null $vendorName = null, array $arguments = [] ) : TYPO3\CMS\Extbase\Mvc\ResponseInterface
$action string | null
$controller string | null
$extensionName string | null
$pluginName string | null
$vendorName string | null
$arguments array
Результат TYPO3\CMS\Extbase\Mvc\ResponseInterface
    public function render($action = null, $controller = null, $extensionName = null, $pluginName = null, $vendorName = null, array $arguments = [])
    {
        $contentObjectBackup = $this->configurationManager->getContentObject();
        if (true === isset($this->request)) {
            $configurationBackup = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $this->request->getControllerExtensionName(), $this->request->getPluginName());
        }
        $temporaryContentObject = new ContentObjectRenderer();
        /** @var \TYPO3\CMS\Extbase\Mvc\Web\Request $request */
        $request = $this->objectManager->get($this->requestType);
        $request->setControllerActionName($action);
        $request->setControllerName($controller);
        $request->setPluginName($pluginName);
        $request->setControllerExtensionName($extensionName);
        $request->setArguments($arguments);
        // TODO: remove for 6.2 LTS
        if (false === empty($vendorName)) {
            $request->setControllerVendorName($vendorName);
        }
        try {
            /** @var \TYPO3\CMS\Extbase\Mvc\ResponseInterface $response */
            $response = $this->objectManager->get($this->responseType);
            $this->configurationManager->setContentObject($temporaryContentObject);
            $this->configurationManager->setConfiguration($this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName, $pluginName));
            $this->dispatcher->dispatch($request, $response);
            $this->configurationManager->setContentObject($contentObjectBackup);
            if (true === isset($configurationBackup)) {
                $this->configurationManager->setConfiguration($configurationBackup);
            }
            return $response;
        } catch (\Exception $error) {
            if (false === (bool) $this->arguments['graceful']) {
                throw $error;
            }
            if (false === empty($this->arguments['onError'])) {
                return sprintf($this->arguments['onError'], [$error->getMessage()], $error->getCode());
            }
            return $error->getMessage() . ' (' . $error->getCode() . ')';
        }
    }