ProviderRegistry
final class \
Registry for configuration providers which is called by the ConfigurationProviderPass
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Constants
- DEFAULT_GROUP : mixed = 'extensions'
- GROUPS : mixed = ['core', 'data', 'backend', 'sites', 'requestHa...
- Groups with a label provided by EXT:lowlevel, in the order they are shown in the module.
Methods
- getFirstProvider() : ProviderInterface|null
- getGroupedProviders() : array<string, ProviderInterface[]>
- Providers per group: the groups of self::GROUPS, custom groups in order of their first provider, and self::DEFAULT_GROUP last. Empty groups are left out.
- getGroupLabel() : string
- Label of a group as returned by getGroupedProviders(). Known groups use the labels of EXT:lowlevel, custom groups starting with "LLL:" are translated, any other value is plain text. If no label can be resolved, the group itself is returned.
- getProvider() : ProviderInterface
- getProviders() : array
- hasProvider() : bool
- registerProvider() : void
Constants
DEFAULT_GROUP
public
mixed
DEFAULT_GROUP
= 'extensions'
GROUPS
Groups with a label provided by EXT:lowlevel, in the order they are shown in the module.
public
mixed
GROUPS
= ['core', 'data', 'backend', 'sites', 'requestHandling', 'events', 'frameworks']
Any other value of the "group" tag attribute is used as label (LLL reference or plain text) of a custom group, shown after these. Providers without "group" end up in DEFAULT_GROUP, shown last.
Methods
getFirstProvider()
public
getFirstProvider() : ProviderInterface|null
Return values
ProviderInterface|nullgetGroupedProviders()
Providers per group: the groups of self::GROUPS, custom groups in order of their first provider, and self::DEFAULT_GROUP last. Empty groups are left out.
public
getGroupedProviders() : array<string, ProviderInterface[]>
The order of providers within a group is the order of getProviders().
Return values
array<string, ProviderInterface[]>getGroupLabel()
Label of a group as returned by getGroupedProviders(). Known groups use the labels of EXT:lowlevel, custom groups starting with "LLL:" are translated, any other value is plain text. If no label can be resolved, the group itself is returned.
public
getGroupLabel(string $group, LanguageService $languageService) : string
Parameters
- $group : string
- $languageService : LanguageService
Return values
stringgetProvider()
public
getProvider(string $identifier) : ProviderInterface
Parameters
- $identifier : string
Return values
ProviderInterfacegetProviders()
public
getProviders() : array
Return values
arrayhasProvider()
public
hasProvider(string $identifier) : bool
Parameters
- $identifier : string
Return values
boolregisterProvider()
public
registerProvider(ProviderInterface $provider, array $attributes) : void
Parameters
- $provider : ProviderInterface
- $attributes : array