ExtensionCompilerPass

class ExtensionCompilerPass implements CompilerPassInterface A pass to automatically process extensions if they implement CompilerPassInterface. Methods process(ContainerBuilder $container) You can modify the container here before it is dumped to PHP code. Details process(ContainerBuilder $container) You can modify the container here before it is dumped to PHP code. Parameters ContainerBuilder $container

Extension::getXsdValidationBasePath()

string getXsdValidationBasePath() Returns the base path for the XSD files. Return Value string The XSD base path

Extension::getNamespace()

string getNamespace() Returns the namespace to be used for this extension (XML namespace). Return Value string The XML namespace

Extension::getConfiguration()

ConfigurationInterface|null getConfiguration(array $config, ContainerBuilder $container) Returns extension configuration. Parameters array $config An array of configuration values ContainerBuilder $container A ContainerBuilder instance Return Value ConfigurationInterface|null The configuration or null

Extension::getClassesToCompile()

array getClassesToCompile() Gets the classes to cache. Return Value array An array of classes

Extension::getAlias()

string getAlias() Returns the recommended alias to use in XML. 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. Return Value string The alias Exceptions BadMethodCallException When the extension name does not follow conventions

Extension::addClassesToCompile()

addClassesToCompile(array $classes) Adds classes to the class cache. Parameters array $classes An array of classes

Extension

class Extension extends Extension Allow adding classes to the class cache. Methods string getXsdValidationBasePath() Returns the base path for the XSD files. from Extension string getNamespace() Returns the namespace to be used for this extension (XML namespace). from Extension string getAlias() Returns the recommended alias to use in XML. from Extension ConfigurationInterface|null getConfiguration(array $config, ContainerBuilder $container) Returns extension configuration f

Extension

class Extension implements ExtensionInterface, ConfigurationExtensionInterface Provides useful features shared by many extensions. Methods string getXsdValidationBasePath() Returns the base path for the XSD files. string getNamespace() Returns the namespace to be used for this extension (XML namespace). string getAlias() Returns the recommended alias to use in XML. ConfigurationInterface|null getConfiguration(array $config, ContainerBuilder $container) Returns extension co

ExpressionVoter::vote()

int vote(TokenInterface $token, mixed $subject, array $attributes) Returns the vote for the given parameters. This method must return one of the following constants: ACCESSGRANTED, ACCESSDENIED, or ACCESS_ABSTAIN. Parameters TokenInterface $token A TokenInterface instance mixed $subject The subject to secure array $attributes An array of attributes associated with the method being invoked Return Value int either ACCESSGRANTED, ACCESSABSTAIN, or ACCESS_DENIED