ServiceProvider

class \TYPO3\CMS\Core\ServiceProvider

Extends
AbstractServiceProvider

Table of Contents

Methods

configureBackendModules()  : ArrayObject
configureBackendRoutes()  : ArrayObject
configureCommands()  : CommandRegistry
configureContentSecurityPolicies()  : Map<Scope, Map<MutationOrigin, MutationCollection>>
configureFluidComponentCollections()  : ArrayObject
configureFluidNamespaces()  : ArrayObject
configureIconRegistry()  : IconRegistry
configureIcons()  : ArrayObject
configureMiddlewares()  : ArrayObject
configureSetCollector()  : SetCollector
extendEventListenerProvider()  : ListenerProvider
getAssetPublishCommand()  : AssetPublishCommand
getAssetsCache()  : FrontendInterface
getAstTraverser()  : AstTraverser
getBackendEntryPointResolver()  : BackendEntryPointResolver
getBootService()  : BootService
getCacheFlushCommand()  : CacheFlushCommand
getCacheFlushTagsCommand()  : CacheFlushTagsCommand
getCacheManager()  : CacheManager
getCacheWarmupCommand()  : CacheWarmupCommand
getCharsetConverter()  : CharsetConverter
getCharsetProvider()  : CharsetProvider
getCommentAwareAstBuilder()  : CommentAwareAstBuilder
getConsoleCommandApplication()  : CommandApplication
getConsoleCommandRegistry()  : CommandRegistry
getContentSecurityPolicies()  : Map
getContext()  : Context
getDatabaseUpgradeWizardsService()  : DatabaseUpgradeWizardsService
getDependencyOrderingService()  : DependencyOrderingService
getDriverMiddlewaresService()  : DriverMiddlewareService
getDriverRegistry()  : DriverRegistry
getDumpAutoloadCommand()  : DumpAutoloadCommand
getEventDispatcher()  : EventDispatcher
getEventListenerProvider()  : ListenerProvider
getExtensions()  : callable[]
Returns a list of all container entries extended by this service provider.
getFactories()  : callable[]
Returns a list of all container entries registered by this service provider.
getFailsafePackageManager()  : FailsafePackageManager
getFeatures()  : Features
getFileIndexRepository()  : FileIndexRepository
getFileNameValidator()  : FileNameValidator
getFlashMessageService()  : FlashMessageService
getFlexFormService()  : FlexFormService
getFluidComponentCollections()  : ArrayObject
getFluidNamespaces()  : ArrayObject
getFormProtectionFactory()  : FormProtectionFactory
getGuzzleClientFactory()  : GuzzleClientFactory
getHashService()  : HashService
getHelpCommand()  : HelpCommand
getIconFactory()  : IconFactory
getIconRegistry()  : IconRegistry
getIcons()  : ArrayObject
getLabelFileResolver()  : LabelFileResolver
getLanguagePackService()  : LanguagePackService
getLanguageServiceFactory()  : LanguageServiceFactory
getListCommand()  : ListCommand
getLocales()  : Locales
getLocalizationFactory()  : LocalizationFactory
getLosslessTokenizer()  : LosslessTokenizer
getMailer()  : Mailer
getMailTransportFactory()  : TransportFactory
getMetaDataRepository()  : MetaDataRepository
getMiddlewares()  : ArrayObject
getOpcodeCacheService()  : OpcodeCacheService
getPackageDependentCacheIdentifier()  : PackageDependentCacheIdentifier
getPasswordHashFactory()  : PasswordHashFactory
getPasswordService()  : PasswordService
getProcessedFileRepository()  : ProcessedFileRepository
getRegistry()  : Registry
getRequestContextFactory()  : RequestContextFactory
getRequestFactory()  : RequestFactory
getResourceFactory()  : ResourceFactory
getResponsePropagationMiddleware()  : ResponsePropagation
getRuntimeCache()  : FrontendInterface
getSilentConfigurationUpgradeService()  : SilentConfigurationUpgradeService
getSiteWriter()  : SiteWriter
getStorageRepository()  : StorageRepository
getSvgDocumentFactory()  : SvgDocumentFactory
getSvgDocumentService()  : SvgDocumentService
getSvgIconProvider()  : SvgIconProvider
getSvgSanitizer()  : SvgSanitizer
getSvgSpriteIconProvider()  : SvgSpriteIconProvider
getSymfonyDumpCompletionCommand()  : DumpCompletionCommand
getSymfonyEventDispatcher()  : EventDispatcherInterface
getSymfonyLintCommand()  : LintCommand
getSymfonyTranslator()  : Translator
getTemplatedEmailFactory()  : mixed
getTranslationDomainMapper()  : TranslationDomainMapper
getTranslationDomainResolver()  : TranslationDomainResolver
getTypoScriptService()  : TypoScriptService
getTypoScriptStringFactory()  : TypoScriptStringFactory
getUpdateLanguagePackCommand()  : UpdateLanguagePackCommand
getUpgradeWizardListCommand()  : UpgradeWizardListCommand
getUpgradeWizardMarkUndoneCommand()  : UpgradeWizardMarkUndoneCommand
getUpgradeWizardRunCommand()  : UpgradeWizardRunCommand
getVerifyHostHeaderMiddleware()  : VerifyHostHeader
getYamlFileLoader()  : YamlFileLoader
provideFallbackConnectionPool()  : ConnectionPool
provideFallbackErrorPageController()  : ErrorPageController
provideFallbackEventDispatcher()  : EventDispatcherInterface
provideFallbackMailer()  : MailerInterface
provideFallbackSystemResourceFactory()  : SystemResourceFactory
provideFallbackSystemResourceIdentifierFactory()  : SystemResourceIdentifierFactory
provideFallbackSystemResourcePublisher()  : SystemResourcePublisherInterface
getPackageName()  : string
Return the composer package name. This is the 'name' attribute in composer.json.
getPackagePath()  : string
Return the path to the package location, including trailing slash should return the value of: __DIR__ . '/../' for ServiceProviders located in the Classes/ directory
new()  : mixed
Create an instance of a class. Supports auto injection of the logger.
requireFile()  : mixed
Require a file in a safe scoped environment avoiding local variable clashes.

Methods

configureBackendModules()

public static configureBackendModules(ContainerInterface $container, ArrayObject $modules[, string|null $path = null ][, string|null $packageName = null ]) : ArrayObject

Parameters

$container : ContainerInterface
$modules : ArrayObject
$path : string|null = null

supplied when invoked internally through PseudoServiceProvider

$packageName : string|null = null

supplied when invoked internally through PseudoServiceProvider

Return values

ArrayObject

configureBackendRoutes()

public static configureBackendRoutes(ContainerInterface $container, ArrayObject $routes[, string|null $path = null ][, string|null $packageName = null ]) : ArrayObject

Parameters

$container : ContainerInterface
$routes : ArrayObject
$path : string|null = null

supplied when invoked internally through PseudoServiceProvider

$packageName : string|null = null

supplied when invoked internally through PseudoServiceProvider

Return values

ArrayObject

configureContentSecurityPolicies()

public static configureContentSecurityPolicies(ContainerInterface $container, Map<Scope, Map<MutationOrigin, MutationCollection>> $mutations[, string|null $path = null ][, string|null $packageName = null ]) : Map<Scope, Map<MutationOrigin, MutationCollection>>

Parameters

$container : ContainerInterface
$mutations : Map<Scope, Map<MutationOrigin, MutationCollection>>
$path : string|null = null
$packageName : string|null = null

Return values

Map<Scope, Map<MutationOrigin, MutationCollection>>

configureFluidComponentCollections()

public static configureFluidComponentCollections(ContainerInterface $container, ArrayObject $componentCollections[, string|null $path = null ]) : ArrayObject

Parameters

$container : ContainerInterface
$componentCollections : ArrayObject
$path : string|null = null

Return values

ArrayObject

configureFluidNamespaces()

public static configureFluidNamespaces(ContainerInterface $container, ArrayObject $namespaces[, string|null $path = null ]) : ArrayObject

Parameters

$container : ContainerInterface
$namespaces : ArrayObject
$path : string|null = null

Return values

ArrayObject

configureIcons()

public static configureIcons(ContainerInterface $container, ArrayObject $icons[, string|null $path = null ]) : ArrayObject

Parameters

$container : ContainerInterface
$icons : ArrayObject
$path : string|null = null

Return values

ArrayObject

configureMiddlewares()

public static configureMiddlewares(ContainerInterface $container, ArrayObject $middlewares[, string|null $path = null ]) : ArrayObject

Parameters

$container : ContainerInterface
$middlewares : ArrayObject
$path : string|null = null

supplied when invoked internally through PseudoServiceProvider

Return values

ArrayObject

configureSetCollector()

public static configureSetCollector(ContainerInterface $container, SetCollector $setCollector[, string|null $path = null ][, string|null $packageName = null ]) : SetCollector

Parameters

$container : ContainerInterface
$setCollector : SetCollector
$path : string|null = null
$packageName : string|null = null

Return values

SetCollector

getAstTraverser()

public static getAstTraverser(ContainerInterface $container) : AstTraverser

Parameters

$container : ContainerInterface

Return values

AstTraverser

getBootService()

public static getBootService(ContainerInterface $container) : BootService

Parameters

$container : ContainerInterface

Return values

BootService

getCacheManager()

public static getCacheManager(ContainerInterface $container) : CacheManager

Parameters

$container : ContainerInterface

Return values

CacheManager

getContentSecurityPolicies()

public static getContentSecurityPolicies(ContainerInterface $container) : Map

Parameters

$container : ContainerInterface

Return values

Map

getContext()

public static getContext(ContainerInterface $container) : Context

Parameters

$container : ContainerInterface

Return values

Context

getExtensions()

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

public getExtensions() : callable[]
  • 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.

Return values

callable[]

getFactories()

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

public getFactories() : callable[]
  • 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)

Return values

callable[]

getFeatures()

public static getFeatures(ContainerInterface $container) : Features

Parameters

$container : ContainerInterface

Return values

Features

getFlexFormService()

public static getFlexFormService(ContainerInterface $container) : FlexFormService

Deprecated

since TYPO3 v14, will be removed in TYPO3 v15.

Parameters

$container : ContainerInterface

Return values

FlexFormService

getFluidComponentCollections()

public static getFluidComponentCollections(ContainerInterface $container) : ArrayObject

Parameters

$container : ContainerInterface

Return values

ArrayObject

getFluidNamespaces()

public static getFluidNamespaces(ContainerInterface $container) : ArrayObject

Parameters

$container : ContainerInterface

Return values

ArrayObject

getHelpCommand()

public static getHelpCommand(ContainerInterface $container) : HelpCommand

Parameters

$container : ContainerInterface

Return values

HelpCommand

getIconFactory()

public static getIconFactory(ContainerInterface $container) : IconFactory

Parameters

$container : ContainerInterface

Return values

IconFactory

getIconRegistry()

public static getIconRegistry(ContainerInterface $container) : IconRegistry

Parameters

$container : ContainerInterface

Return values

IconRegistry

getIcons()

public static getIcons(ContainerInterface $container) : ArrayObject

Parameters

$container : ContainerInterface

Return values

ArrayObject

getListCommand()

public static getListCommand(ContainerInterface $container) : ListCommand

Parameters

$container : ContainerInterface

Return values

ListCommand

getLocales()

public static getLocales(ContainerInterface $container) : Locales

Parameters

$container : ContainerInterface

Return values

Locales

getMailer()

public static getMailer(ContainerInterface $container) : Mailer

Parameters

$container : ContainerInterface

Return values

Mailer

getMiddlewares()

public static getMiddlewares(ContainerInterface $container) : ArrayObject

Parameters

$container : ContainerInterface

Return values

ArrayObject

getRegistry()

public static getRegistry(ContainerInterface $container) : Registry

Parameters

$container : ContainerInterface

Return values

Registry

getSiteWriter()

public static getSiteWriter(ContainerInterface $container) : SiteWriter

Parameters

$container : ContainerInterface

Return values

SiteWriter

getSvgSanitizer()

public static getSvgSanitizer(ContainerInterface $container) : SvgSanitizer

Parameters

$container : ContainerInterface

Return values

SvgSanitizer

getSymfonyDumpCompletionCommand()

public static getSymfonyDumpCompletionCommand(ContainerInterface $container) : DumpCompletionCommand

Parameters

$container : ContainerInterface

Return values

DumpCompletionCommand

getSymfonyEventDispatcher()

public static getSymfonyEventDispatcher(ContainerInterface $container) : EventDispatcherInterface

Parameters

$container : ContainerInterface

Return values

EventDispatcherInterface

getSymfonyLintCommand()

public static getSymfonyLintCommand(ContainerInterface $container) : LintCommand

Parameters

$container : ContainerInterface

Return values

LintCommand

getSymfonyTranslator()

public static getSymfonyTranslator(ContainerInterface $container) : Translator

Parameters

$container : ContainerInterface

Return values

Translator

getTemplatedEmailFactory()

public static getTemplatedEmailFactory(ContainerInterface $container) : mixed

Parameters

$container : ContainerInterface

provideFallbackEventDispatcher()

public static provideFallbackEventDispatcher(ContainerInterface $container[, EventDispatcherInterface|null $eventDispatcher = null ]) : EventDispatcherInterface

Parameters

$container : ContainerInterface
$eventDispatcher : EventDispatcherInterface|null = null

Return values

EventDispatcherInterface

getPackageName()

Return the composer package name. This is the 'name' attribute in composer.json.

protected static getPackageName() : string

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

Return values

string

getPackagePath()

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

protected static getPackagePath() : string

Return values

string

new()

Create an instance of a class. Supports auto injection of the logger.

protected static new(ContainerInterface $container, string $className[, array $constructorArguments = [] ]) : mixed

Parameters

$container : ContainerInterface
$className : string

name of the class to instantiate, must not be empty and not start with a backslash

$constructorArguments : array = []

Arguments for the constructor

requireFile()

Require a file in a safe scoped environment avoiding local variable clashes.

protected static requireFile(string $filename) : mixed

Parameters

$filename : string
On this page