Default configuration
Let's start with a simple task and add some default configuration to our example module.
In Drupal 7, you have to use custom code to create and update the default configuration, such as content types, views, or field configurations. Many people also use the great Features module that provides some handy functions to manage default configuration easily.
Drupal 8 uses the .yml
files we talked about extensively in previous chapters to store information about the default configuration. The Configuration Management system itself takes care of creating and managing the default configuration, so we can focus on writing its definition rather than creating the functions for management.
An example
Let's add a custom vocabulary to our site and define the term container and its configuration in the example module we used in the previous chapters. The vocabulary should be named Category
and have the internal identifier cm_example_category
(this is the machine-readable name...