Book Image

Drupal 8 Configuration Management

Book Image

Drupal 8 Configuration Management

Overview of this book

Table of Contents (16 chapters)
Drupal 8 Configuration Management
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

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). For the...