‪TYPO3CMS  11.5
TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory Class Reference

Public Member Functions

 __construct (ContainerInterface $container, CacheManager $cacheManager, ViewHelperResolverFactoryInterface $viewHelperResolverFactory)
 
 create ()
 

Private Attributes

ContainerInterface $container
 
CacheManager $cacheManager
 
ViewHelperResolverFactoryInterface $viewHelperResolverFactory
 

Detailed Description

Factory class registered in ServiceProvider to create a RenderingContext.

This is a low level factory always registered, even in failsafe mode: fluid is needed in install tool which does not rely on the normal (cached) symfony DI mechanism - Services.yaml is ignored in failsafe mode.

A casual failsafe instantiation / injection using ServiceProvider.php wouldn't need this factory. But the failsafe mechanism is strict and relies on two things: The service is public: true, this is the case with RenderingContext. And the service is shared: true - a stateless singleton. This is not true for RenderingContext, it by definition relies on context and must be created a-new per fluid parsing instance.

To allow creating RenderingContext objects in failsafe mode, this factory is registered as service provider to dynamically prepare instances.

May change / vanish any time

Definition at line 50 of file RenderingContextFactory.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory::__construct ( ContainerInterface  $container,
CacheManager  $cacheManager,
ViewHelperResolverFactoryInterface  $viewHelperResolverFactory 
)

Member Function Documentation

◆ create()

TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory::create ( )

Definition at line 66 of file RenderingContextFactory.php.

References $GLOBALS.

Member Data Documentation

◆ $cacheManager

CacheManager TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory::$cacheManager
private

◆ $container

ContainerInterface TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory::$container
private

◆ $viewHelperResolverFactory

ViewHelperResolverFactoryInterface TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory::$viewHelperResolverFactory
private