Module developers can export packages and include as part of their module. When set-up correctly, the packages will automatically import when the module is enabled.
To set this up, create a new Yaml reference file inside your module:
config/site_studio/site_studio.packages.yml
This file should contain an array following the specific format. Each package in array needs to have "type" and "source" and can optionally have "options":
type - required property that decides how metadata in source property will be handled. For the default implementation of package handling where package files located in a module subdirectory `config/site_studio/<package>`, use default_module_package.
source - required property, that provides metadata required to import the package. For example, if type is set to default_module_package, then source needs to contain properties module_name (which refers to machine name of the module that contains the package files) and path (which refers to path from the module directory to the package files directory)
options - optional property, which allows for extra settings to be passed. Currently only extra-validation option is supported. If options property is omitted, extra-validation is set to false by default.
Here's an example of site_studio.packages.yml containing two packages, both using default_module_package type:
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Site Studio
Importing a list of packages on module install
Importing a list of packages on module install
Module developers can export packages and include as part of their module. When set-up correctly, the packages will automatically import when the module is enabled.
To set this up, create a new Yaml reference file inside your module:
config/site_studio/site_studio.packages.yml
This file should contain an array following the specific format. Each package in array needs to have "type" and "source" and can optionally have "options":
type - required property that decides how metadata in source property will be handled. For the default implementation of package handling where package files located in a module subdirectory `config/site_studio/<package>`, use default_module_package.
source - required property, that provides metadata required to import the package. For example, if type is set to default_module_package, then source needs to contain properties module_name (which refers to machine name of the module that contains the package files) and path (which refers to path from the module directory to the package files directory)
options - optional property, which allows for extra settings to be passed. Currently only extra-validation option is supported. If options property is omitted, extra-validation is set to false by default.
Here's an example of site_studio.packages.yml containing two packages, both using default_module_package type: