‪TYPO3CMS  11.5
ServiceProvider.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
18 namespace ‪TYPO3\CMS\Fluid;
19 
20 use Psr\Container\ContainerInterface;
24 
29 {
30  protected static function ‪getPackagePath(): string
31  {
32  return __DIR__ . '/../';
33  }
34 
35  public function ‪getFactories(): array
36  {
37  return [
38  Core\Rendering\RenderingContextFactory::class => [ static::class, 'getRenderingContextFactory' ],
39  Core\ViewHelper\ViewHelperResolverFactory::class => [ static::class, 'getViewHelperResolverFactory' ],
40  Core\ViewHelper\ViewHelperResolverFactoryInterface::class => [ static::class, 'getViewHelperResolverFactoryInterface' ],
41  ];
42  }
43 
44  public static function ‪getRenderingContextFactory(ContainerInterface $container): Core\Rendering\RenderingContextFactory
45  {
46  return ‪self::new($container, Core\Rendering\RenderingContextFactory::class, [
47  $container,
48  $container->get(CacheManager::class),
49  $container->get(Core\ViewHelper\ViewHelperResolverFactoryInterface::class),
50  ]);
51  }
52 
53  public static function ‪getViewHelperResolverFactory(ContainerInterface $container): Core\ViewHelper\ViewHelperResolverFactory
54  {
55  return ‪self::new($container, Core\ViewHelper\ViewHelperResolverFactory::class, [
56  $container,
57  // @deprecated since v11, will be removed with 12.
58  $container->get(ObjectManager::class),
59  ]);
60  }
61 
62  public static function ‪getViewHelperResolverFactoryInterface(ContainerInterface $container): Core\ViewHelper\ViewHelperResolverFactoryInterface
63  {
64  return $container->get(Core\ViewHelper\ViewHelperResolverFactory::class);
65  }
66 }
‪TYPO3\CMS\Fluid
‪TYPO3\CMS\Core\Package\AbstractServiceProvider
Definition: AbstractServiceProvider.php:31
‪TYPO3\CMS\Fluid\ServiceProvider\getFactories
‪getFactories()
Definition: ServiceProvider.php:35
‪TYPO3\CMS\Fluid\ServiceProvider\getPackagePath
‪static getPackagePath()
Definition: ServiceProvider.php:30
‪TYPO3\CMS\Core\Package\AbstractServiceProvider\new
‪static mixed new(ContainerInterface $container, string $className, array $constructorArguments=[])
Definition: AbstractServiceProvider.php:130
‪TYPO3\CMS\Fluid\ServiceProvider\getRenderingContextFactory
‪static getRenderingContextFactory(ContainerInterface $container)
Definition: ServiceProvider.php:44
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:36
‪TYPO3\CMS\Fluid\ServiceProvider\getViewHelperResolverFactoryInterface
‪static getViewHelperResolverFactoryInterface(ContainerInterface $container)
Definition: ServiceProvider.php:62
‪TYPO3\CMS\Fluid\ServiceProvider
Definition: ServiceProvider.php:29
‪TYPO3\CMS\Extbase\Object\ObjectManager
Definition: ObjectManager.php:31
‪TYPO3\CMS\Fluid\ServiceProvider\getViewHelperResolverFactory
‪static getViewHelperResolverFactory(ContainerInterface $container)
Definition: ServiceProvider.php:53