eZ Platform configuration is delivered using a number of dedicated configuration files. It contains everything from selecting the content Repository to SiteAccesses to language settings.
The recommended configuration format is YAML. It is used by default in the kernel (and in examples throughout the documentation). However, you can also use XML or PHP formats for configuration.
Main configuration files are located in the
parameters.ymlcontains infrastructure-related configuration. It is created based on the default settings defined in
config.ymlcontains configuration stemming from Symfony and covers settings such as search engine or cache configuration.
ezplatform.ymlcontains general configuration that is specific for eZ Platform, like for example SiteAccess settings.
security.ymlis the place for security-related settings.
routing.ymldefines routes that will be used throughout the application.
Configuration can be made environment-specific using separate files for each environment. These files contain additional settings and point to the general (not environment-specific) configuration that is applied in other cases.
Read more about how configuration is handled in Symfony.
Basic configuration handling in eZ Platform is similar to what is commonly possible with Symfony. You can define key/value pairs in your configuration files.
Internally and by convention, keys follow a dot syntax, where the different segments follow your configuration hierarchy. Keys are usually prefixed by a namespace corresponding to your application. All kinds of values are accepted, including arrays and deep hashes.
For configuration that is meant to be exposed to an end-user (or end-developer), it's usually a good idea to also implement semantic configuration.
Note that you can also implement SiteAccess-aware semantic configuration.
1 2 3 4 5 6
parameters: myapp.parameter.name: someValue myapp.boolean.param: true myapp.some.hash: foo: bar an_array: [apple, banana, pear]
// Usage inside a controller $myParameter = $this->container->getParameter( 'myapp.parameter.name' );
For specific configuration settings, see: