Providing the configuration on the installation or update
Drupal provides a configuration management system, which is discussed in Chapter 9, Configuration Management - Deploying in Drupal 8, and modules can provide configuration on an installation or through an update system. Modules provide the configuration through YAML
files when they are first installed. Once the module is enabled, the configuration is then placed in the configuration management system; however updates can be made to the configuration in code through the Drupal update system.
In this recipe, we will provide a configuration YAML that creates a new contact form and then manipulates it through a schema version change in the update system.
Getting ready
Create a new module like the one in the first recipe. We will refer to the module as mymodule
throughout the recipe. Use your module's appropriate name where necessary.
How to do it...
- Create a
config
folder in your module's base directory. Drupal requires its configuration YAML...