6

I can see a folder named config in Drupal 8 core modules which contains sub directories like optional, schema and install.

I can see it is like a settings folder which is initialised during module installation. But how do they differ from each other?

1 Answer 1

8
  • schema
    This folder is used for schema related things. This is most often used to tell Drupal how custom configurations and configuration entities will be saved.
  • install
    The folder can contain configurations, for example a view. All configurations will be installed; if any configuration fails, the module can't be installed.
  • optional
    The folder can contain configurations, for example a view. All configurations will be installed if possible. If a configuration has missing dependencies, it won't be installed.

Configuration installation only happens when the module itself is installed. Optional configurations can install missing configurations when dependencies are met by a new installed module.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.