‪TYPO3CMS  ‪main
TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolverFactory Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolverFactory:
TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolverFactoryInterface

Public Member Functions

 __construct (private readonly ContainerInterface $container)
 
 create ()
 

Detailed Description

Factory class registered in ServiceProvider to create a ViewHelperResolver.

Note fluid is a failsafe mode aware extensions since its used in the install tool. We thus need a ServiceProvider.php to correctly instantiate / inject these class objects. This would be simple, but ViewHelperResolver has state, and the failsafe mode expects injected services to not have state.

So, to retrieve a ViewHelperResolver instance, an instance of this factory is retrieved instead (which is a singleton), which then creates a 'fresh' instance of the ViewHelperResolver each time create() is called.

May change / vanish any time

Definition at line 36 of file ViewHelperResolverFactory.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolverFactory::__construct ( private readonly ContainerInterface  $container)

Definition at line 38 of file ViewHelperResolverFactory.php.

Member Function Documentation

◆ create()

TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolverFactory::create ( )