Extension
in package
implements
ExtensionInterface, ConfigurationExtensionInterface
Provides useful features shared by many extensions.
Tags
Interfaces, Classes and Traits
- ExtensionInterface
- ExtensionInterface is the interface implemented by container extension classes.
- ConfigurationExtensionInterface
- ConfigurationExtensionInterface is the interface implemented by container extension classes.
Table of Contents
- $processedConfigs : mixed
- getAlias() : string
- Returns the recommended alias to use in XML.
- getConfiguration() : ConfigurationInterface|null
- Returns extension configuration.
- getNamespace() : string
- Returns the namespace to be used for this extension (XML namespace).
- getXsdValidationBasePath() : string|false
- Returns the base path for the XSD files.
- isConfigEnabled() : bool
- processConfiguration() : array<string|int, mixed>
Properties
$processedConfigs
private
mixed
$processedConfigs
= []
Methods
getAlias()
Returns the recommended alias to use in XML.
public
getAlias() : string
This alias is also the mandatory prefix to use when using YAML.
This convention is to remove the "Extension" postfix from the class name and then lowercase and underscore the result. So:
AcmeHelloExtension
becomes
acme_hello
This can be overridden in a sub-class to specify the alias manually.
Tags
Return values
string —getConfiguration()
Returns extension configuration.
public
getConfiguration(array<string|int, mixed> $config, ContainerBuilder $container) : ConfigurationInterface|null
Parameters
- $config : array<string|int, mixed>
- $container : ContainerBuilder
Return values
ConfigurationInterface|null —getNamespace()
Returns the namespace to be used for this extension (XML namespace).
public
getNamespace() : string
Return values
string —getXsdValidationBasePath()
Returns the base path for the XSD files.
public
getXsdValidationBasePath() : string|false
Return values
string|false —isConfigEnabled()
protected
isConfigEnabled(ContainerBuilder $container, array<string|int, mixed> $config) : bool
Parameters
- $container : ContainerBuilder
- $config : array<string|int, mixed>
Tags
Return values
bool —processConfiguration()
protected
final processConfiguration(ConfigurationInterface $configuration, array<string|int, mixed> $configs) : array<string|int, mixed>
Parameters
- $configuration : ConfigurationInterface
- $configs : array<string|int, mixed>