‪TYPO3CMS  ‪main
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;
23 
28 {
29  protected static function ‪getPackagePath(): string
30  {
31  return __DIR__ . '/../';
32  }
33 
34  protected static function ‪getPackageName(): string
35  {
36  return 'typo3/cms-fluid';
37  }
38 
39  public function ‪getFactories(): array
40  {
41  return [
42  Core\Rendering\RenderingContextFactory::class => ‪self::getRenderingContextFactory(...),
43  Core\ViewHelper\ViewHelperResolverFactory::class => ‪self::getViewHelperResolverFactory(...),
44  Core\ViewHelper\ViewHelperResolverFactoryInterface::class => ‪self::getViewHelperResolverFactoryInterface(...),
45  ];
46  }
47 
48  public static function ‪getRenderingContextFactory(ContainerInterface $container): Core\Rendering\RenderingContextFactory
49  {
50  return ‪self::new($container, Core\Rendering\RenderingContextFactory::class, [
51  $container,
52  $container->get(CacheManager::class),
53  $container->get(Core\ViewHelper\ViewHelperResolverFactoryInterface::class),
54  ]);
55  }
56 
57  public static function ‪getViewHelperResolverFactory(ContainerInterface $container): Core\ViewHelper\ViewHelperResolverFactory
58  {
59  return ‪self::new($container, Core\ViewHelper\ViewHelperResolverFactory::class, [
60  $container,
61  ]);
62  }
63 
64  public static function ‪getViewHelperResolverFactoryInterface(ContainerInterface $container): Core\ViewHelper\ViewHelperResolverFactoryInterface
65  {
66  return $container->get(Core\ViewHelper\ViewHelperResolverFactory::class);
67  }
68 }
‪TYPO3\CMS\Fluid
‪TYPO3\CMS\Core\Package\AbstractServiceProvider
Definition: AbstractServiceProvider.php:35
‪TYPO3\CMS\Fluid\ServiceProvider\getFactories
‪getFactories()
Definition: ServiceProvider.php:39
‪TYPO3\CMS\Fluid\ServiceProvider\getPackagePath
‪static getPackagePath()
Definition: ServiceProvider.php:29
‪TYPO3\CMS\Core\Package\AbstractServiceProvider\new
‪static mixed new(ContainerInterface $container, string $className, array $constructorArguments=[])
Definition: AbstractServiceProvider.php:183
‪TYPO3\CMS\Fluid\ServiceProvider\getPackageName
‪static getPackageName()
Definition: ServiceProvider.php:34
‪TYPO3\CMS\Fluid\ServiceProvider\getRenderingContextFactory
‪static getRenderingContextFactory(ContainerInterface $container)
Definition: ServiceProvider.php:48
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:36
‪TYPO3\CMS\Fluid\ServiceProvider\getViewHelperResolverFactoryInterface
‪static getViewHelperResolverFactoryInterface(ContainerInterface $container)
Definition: ServiceProvider.php:64
‪TYPO3\CMS\Fluid\ServiceProvider
Definition: ServiceProvider.php:28
‪TYPO3\CMS\Fluid\ServiceProvider\getViewHelperResolverFactory
‪static getViewHelperResolverFactory(ContainerInterface $container)
Definition: ServiceProvider.php:57