‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\ServiceProvider Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ServiceProvider:
TYPO3\CMS\Core\Package\AbstractServiceProvider TYPO3\CMS\Core\DependencyInjection\ServiceProviderInterface

Public Member Functions

 getFactories ()
 
 getExtensions ()
 

Static Public Member Functions

static getApplication (ContainerInterface $container)
 
static provideFallbackRequestHandler (ContainerInterface $container, RequestHandlerInterface $requestHandler=null)
 
static getFrontendMiddlewares (ContainerInterface $container)
 
- ‪Static Public Member Functions inherited from ‪TYPO3\CMS\Core\Package\AbstractServiceProvider
static configureMiddlewares (ContainerInterface $container, \ArrayObject $middlewares, string $path=null)
 
static configureBackendRoutes (ContainerInterface $container, \ArrayObject $routes, string $path=null, string $packageName=null)
 
static configureBackendModules (ContainerInterface $container, \ArrayObject $modules, string $path=null, string $packageName=null)
 
static Map< Scope, configureContentSecurityPolicies(ContainerInterface $container, Map $mutations, string $path=null, string $packageName=null):Map { $path=$path ?? static::getPackagePath();$packageName=$packageName ?? static::getPackageName();$fileName=$path . 'Configuration/ContentSecurityPolicies.php';if(file_exists( $fileName)) { $mutationsInPackage=require $fileName;foreach( $mutationsInPackage as $scope=> $mutation) { if(!isset( $mutations[ $scope])) { $mutations[ $scope]=new Map();} $origin=new MutationOrigin(MutationOriginType::package, $packageName);$mutations[ $scope][ $origin]=$mutation;} } return $mutations;} public static function configureIcons(ContainerInterface $container, \ArrayObject $icons, string $path=null):\ArrayObject { $path=$path ?? static::getPackagePath();$iconsFileNameForPackage=$path . 'Configuration/Icons.php';if(file_exists( $iconsFileNameForPackage)) { $definedIconsInPackage=require $iconsFileNameForPackage;if(is_array( $definedIconsInPackage)) { $icons-> exchangeArray (array_merge($icons->getArrayCopy(), $definedIconsInPackage))
 
static configureSetCollector (ContainerInterface $container, SetCollector $setCollector, string $path=null)
 

Static Protected Member Functions

static getPackagePath ()
 
static getPackageName ()
 
- ‪Static Protected Member Functions inherited from ‪TYPO3\CMS\Core\Package\AbstractServiceProvider
static mixed new (ContainerInterface $container, string $className, array $constructorArguments=[])
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Package\AbstractServiceProvider
return $icons
 

Detailed Description

Definition at line 34 of file ServiceProvider.php.

Member Function Documentation

◆ getApplication()

static TYPO3\CMS\Frontend\ServiceProvider::getApplication ( ContainerInterface  $container)
static

Definition at line 61 of file ServiceProvider.php.

Referenced by TYPO3\CMS\Frontend\ServiceProvider\getFactories().

◆ getExtensions()

TYPO3\CMS\Frontend\ServiceProvider::getExtensions ( )

Returns a list of all container entries extended by this service provider.

  • ‪the key is the entry name
  • ‪the value is a callable that will return the modified entry

Callables have the following signature: function(Psr\Container\ContainerInterface $container, $previous) or function(Psr\Container\ContainerInterface $container, $previous = null)

About factories parameters:

  • ‪the container (instance of Psr\Container\ContainerInterface)
  • ‪the entry to be extended. If the entry to be extended does not exist and the parameter is nullable, null will be passed.
Returns
‪callable[]

Reimplemented from TYPO3\CMS\Core\Package\AbstractServiceProvider.

Definition at line 54 of file ServiceProvider.php.

References TYPO3\CMS\Frontend\ServiceProvider\provideFallbackRequestHandler().

◆ getFactories()

TYPO3\CMS\Frontend\ServiceProvider::getFactories ( )

Returns a list of all container entries registered by this service provider.

  • ‪the key is the entry name
  • ‪the value is a callable that will return the entry, aka the factory

Factories have the following signature: function(\Psr\Container\ContainerInterface $container)

Returns
‪callable[]

Reimplemented from TYPO3\CMS\Core\Package\AbstractServiceProvider.

Definition at line 46 of file ServiceProvider.php.

References TYPO3\CMS\Frontend\ServiceProvider\getApplication(), and TYPO3\CMS\Frontend\ServiceProvider\getFrontendMiddlewares().

◆ getFrontendMiddlewares()

static TYPO3\CMS\Frontend\ServiceProvider::getFrontendMiddlewares ( ContainerInterface  $container)
static
Exceptions
InvalidDataException
CoreException

Definition at line 92 of file ServiceProvider.php.

Referenced by TYPO3\CMS\Frontend\ServiceProvider\getFactories().

◆ getPackageName()

static TYPO3\CMS\Frontend\ServiceProvider::getPackageName ( )
staticprotected

Return the composer package name. This is the 'name' attribute in composer.json. Note composer.json existence for 'extensions' is still not mandatory in non-composer mode, the method returns empty string in this case.

Reimplemented from TYPO3\CMS\Core\Package\AbstractServiceProvider.

Definition at line 41 of file ServiceProvider.php.

◆ getPackagePath()

static TYPO3\CMS\Frontend\ServiceProvider::getPackagePath ( )
staticprotected

Return the path to the package location, including trailing slash should return the value of: DIR . '/../' for ServiceProviders located in the Classes/ directory

Reimplemented from TYPO3\CMS\Core\Package\AbstractServiceProvider.

Definition at line 36 of file ServiceProvider.php.

◆ provideFallbackRequestHandler()

static TYPO3\CMS\Frontend\ServiceProvider::provideFallbackRequestHandler ( ContainerInterface  $container,
RequestHandlerInterface  $requestHandler = null 
)
static