Sets legacy "option" properties to the view for backwards compatibility.

@param ViewInterface $view
@param array $renderingOptions
@return ViewInterface
184122
protected function applyLegacyViewOptions(ViewInterface $view, array $renderingOptions): ViewInterface
    {
        if (isset($renderingOptions['templatePathAndFilename'])) {
            ObjectAccess::setProperty($view, 'templatePathAndFilename', $renderingOptions['templatePathAndFilename']);
        }
        if (isset($renderingOptions['layoutRootPath'])) {
            ObjectAccess::setProperty($view, 'layoutRootPath', $renderingOptions['layoutRootPath']);
        }
        if (isset($renderingOptions['partialRootPath'])) {
            ObjectAccess::setProperty($view, 'partialRootPath', $renderingOptions['partialRootPath']);
        }
        if (isset($renderingOptions['format'])) {
            ObjectAccess::setProperty($view, 'format', $renderingOptions['format']);
        }

        return $view;
    }
1126735
protected function initializeView(ViewInterface $view)
    {
        parent::initializeView($view);

        /* @var ModuleTemplate $module */ // holds the state of chosen tab
        $module = GeneralUtility::makeInstance(ModuleTemplate::class);
        $coreOptimizationTabs = $module->getDynamicTabMenu([], 'coreOptimization');
        $this->view->assign('tabs', $coreOptimizationTabs);
    }
566663
protected function renderOptions(BlockLayout $layout, array $options)
    {
        $layout->add(new Paragraph('<b>OPTIONS</b>'));
        $layout->beginBlock();

        foreach ($options as $option) {
            $this->renderOption($layout, $option);
        }

        $layout->endBlock();
        $layout->add(new EmptyLine());
    }
78435
public function buildView(FormView $view, FormInterface $form, array $options)
    {
        $view->vars['translation'] = isset($options['translation']) && $options['translation'] === true;
        $view->vars['currentLocale'] = $this->defaultLocale;
        if($view->vars['translation']) {
            $parent = $form->getParent();
            if($parent instanceof Form) {
                $property = new Property($form->getPropertyPath());
                $entity = $parent->getConfig()->getDataClass();
                if(is_object($parent->getData())) {
                    $entity = $parent->getData();
                }

                $translations = $this->translator->getTranslationData($entity, $property);
                if($translations === null) {
                    $view->vars['translation'] = false;
                    return;
                }
                $view->vars['translations'] = $translations;
            }
        }
    }
605750
public function display(array $options, View $view): void
    {
        $this->validateOptions($options);

        $this->set('cakeView', $view);
        $this->set('isBatch', $this->batch);
        $this->set('isGroup', (bool)$this->getGroupByField());
        $this->set('isSystem', (bool)$this->entity->get('system'));
        $this->set('isExport', $this->getExport());
        $this->set('viewOptions', $this->getViewOptions());
        $this->set('tableOptions', [
            'id' => $this->getTableId(),
            'headers' => $this->getTableHeaders()
        ]);
        $this->set('dtOptions', $this->getDatatableOptions());
        $this->set('chartOptions', $this->getChartOptions());
    }
1368540
public function setView(ViewComponentInterface $view = null)
    {
        if ($view === $this->view) {
            return $this;
        }
        $this->view && $this->view->detach();
        $view && $view->attachTo($this);
        $this->view = $view;
        return $this;
    }
694293
public function setOptions(array $options)
    {
        if (isset($options['rendererClassName'])) {
            $this->setRendererClassName($options['rendererClassName']);
        }
        if (isset($options['renderingOptions'])) {
            foreach ($options['renderingOptions'] as $key => $value) {
                $this->setRenderingOption($key, $value);
            }
        }
        if (isset($options['finishers'])) {
            foreach ($options['finishers'] as $finisherConfiguration) {
                $this->createFinisher($finisherConfiguration['identifier'], isset($finisherConfiguration['options']) ? $finisherConfiguration['options'] : []);
            }
        }

        FormArrays::assertAllArrayKeysAreValid($options, array('rendererClassName', 'renderingOptions', 'finishers'));
    }
986162
public function compose( ViewInterface $view ) {
		$composers = $this->getComposersForView( $view->getName() );

		foreach ( $composers as $composer ) {
			$composer->execute( $view );
		}
	}
722229
public function setOptions($options) {
		$this->renderer->getElement()->setOptions($options);
		$this->renderer->getHtmlElement()->setOptions($options);
	}
805951
public function getViewProviders(View $view)
    {
        foreach (array_keys($this->viewProviders) as $type) {
            if ($view instanceof $type) {
                return $this->viewProviders[$type];
            }
        }
        throw new InvalidArgumentException('view', 'No compatible ViewProvider found for ' . gettype($view));
    }
217047
def _set_render_options(cls, options, backend=None):
        
        if backend:
            backend = backend.split(':')[0]
        else:
            backend = Store.current_backend

        cls.set_backend(backend)
        if 'widgets' in options:
            options['widget_mode'] = options['widgets']
        renderer = Store.renderers[backend]
        render_options = {k: options[k] for k in cls.render_params if k in options}
        renderer.param.set_param(**render_options)
101136
private function evaluateParameters(ViewInterface $view, array $parameters): Generator
    {
        foreach ($parameters as $key => $value) {
            if (is_string($value) && mb_strpos($value, '@=') === 0) {
                $expressionLanguage = new ExpressionLanguage();
                $value = $expressionLanguage->evaluate(
                    mb_substr($value, 2),
                    [
                        'view' => $view,
                    ] + $view->getParameters()
                );
            }

            yield $key => $value;
        }
    }
811988
protected function setPlatformOptions(InputInterface $input, OutputInterface $output)
    {
        $platform = ProjectX::getPlatformType();

        if (!$platform instanceof NullPlatformType
            && $platform instanceof OptionFormAwareInterface) {
            $classname = get_class($platform);
            $command_io = new SymfonyStyle($input, $output);
            $command_io->newLine(2);
            $command_io->title(sprintf('%s Platform Options', $classname::getLabel()));

            $form = $platform->optionForm();
            $form
                ->setInput($input)
                ->setOutput($output)
                ->setHelperSet($this->getHelperSet())
                ->process();

            $this->options[$classname::getTypeId()] = $form->getResults();
        }

        return $this;
    }
786127
protected function initializeView(ViewInterface $view)
    {
        parent::initializeView($view);

        // Early return for actions without valid view like tcaCreateAction or tcaDeleteAction
        if (!($this->view instanceof BackendTemplateView)) {
            return;
        }

        // Hand over flash message queue to module template
        $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
        $this->view->assign('actions', ['index', 'typography', 'tca', 'trees', 'tab', 'tables', 'avatar', 'buttons',
            'infobox', 'flashMessages', 'icons', 'debug', 'helpers', 'modal']);
        $this->view->assign('currentAction', $this->request->getControllerActionName());

        // Shortcut button
        $buttonBar = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar();
        $getVars = $this->request->getArguments();
        $extensionName = $this->request->getControllerExtensionName();
        $moduleName = $this->request->getPluginName();
        if (count($getVars) === 0) {
            $modulePrefix = strtolower('tx_' . $extensionName . '_' . $moduleName);
            $getVars = array('id', 'M', $modulePrefix);
        }
        $shortcutButton = $buttonBar->makeShortcutButton()
            ->setModuleName($moduleName)
            ->setGetVariables($getVars);
        $buttonBar->addButton($shortcutButton);
    }
284502
protected function calculateViewValue($id, $view, & $properties_cache = null, & $view_cache = null, & $persistent_view_cache = null)
	{
		throw new InvalidArgumentException('Unknown view "'.$view.'" requested on machine "'.$this->machine_type.'".');
	}
718863
public function doRenderPagination(PaginationView $view, $template = '@Pagination/pagination/default.html.twig')
    {
        if (null === $this->twig) {
            throw new \LogicException('Template component not injected to PaginationLibrary');
        }

        return $this->twig->render($template, [
            'pager' => $view,
        ]);
    }
266979
protected function buildView(\Throwable $exception, array $renderingOptions): ViewInterface
    {
        $statusCode = ($exception instanceof WithHttpStatusInterface) ? $exception->getStatusCode() : 500;
        $referenceCode = ($exception instanceof WithReferenceCodeInterface) ? $exception->getReferenceCode() : null;

        $statusMessage = ResponseInformationHelper::getStatusMessageByCode($statusCode);
        $viewClassName = $renderingOptions['viewClassName'];
        /** @var ViewInterface $view */
        $view = $viewClassName::createWithOptions($renderingOptions['viewOptions']);
        $view = $this->applyLegacyViewOptions($view, $renderingOptions);

        $httpRequest = Request::createFromEnvironment();
        $request = new ActionRequest($httpRequest);
        $request->setControllerPackageKey('Neos.Flow');
        $uriBuilder = new UriBuilder();
        $uriBuilder->setRequest($request);
        $view->setControllerContext(new ControllerContext(
            $request,
            new ActionResponse(),
            new Arguments([]),
            $uriBuilder
        ));

        if (isset($renderingOptions['variables'])) {
            $view->assignMultiple($renderingOptions['variables']);
        }

        $view->assignMultiple([
            'exception' => $exception,
            'renderingOptions' => $renderingOptions,
            'statusCode' => $statusCode,
            'statusMessage' => $statusMessage,
            'referenceCode' => $referenceCode
        ]);

        return $view;
    }