‪TYPO3CMS  11.5
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 (ContainerInterface $container, ObjectManagerInterface $objectManager)
 
 create ()
 

Private Attributes

ContainerInterface $container
 
ObjectManagerInterface $objectManager
 

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 37 of file ViewHelperResolverFactory.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolverFactory::__construct ( ContainerInterface  $container,
ObjectManagerInterface  $objectManager 
)

Member Function Documentation

◆ create()

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

Member Data Documentation

◆ $container

ContainerInterface TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolverFactory::$container
private

◆ $objectManager

ObjectManagerInterface TYPO3\CMS\Fluid\Core\ViewHelper\ViewHelperResolverFactory::$objectManager
private