Skip to main content
Version: v1

Modules

This page is for developers working on a project built from Vortex. It explains how the template requires, configures and installs each shipped module, and what the installer removes when you leave a module out. For what each module does, see Contributed modules. For the custom modules, see Module scaffold.

Vortex ships up to 26 contributed modules, depending on your installer answers, each already wired into the environment-aware settings and, where it needs installing, the provisioning scripts. You add the rest of your modules after the initial setup.

Vortex isn't a Drupal distribution. It ships an installation profile only when you ask the installer for a custom profile. The only recipe it ships is recipes/page, which creates the demo content model during provisioning.

The installer can remove every shipped module except Search API. The installer's Modules question lists 19 of the shipped modules. Deselecting 1 removes the following in a single pass:

  • Its Composer requirement
  • Its settings override
  • Its provisioning steps
  • Its Behat feature
  • Its assertions in the settings tests
  • Any other block the template marks for it, such as its variables in .env

If you keep the demo module, keep Drupal helpers selected too: ys_demo declares it as a dependency and calls it in its deploy hooks, so ys_demo can't install without it.

The remaining 7 modules sit outside the Modules question:

  • ClamAV, Redis and Search API Solr follow the Services question.
  • Migrate Plus and Migrate Tools follow the Use a second database for migrations? question.
  • Storybook follows the Storybook component library? question, which the installer asks only when you choose a custom theme.
  • Search API follows no question and stays required even without the Solr service.

The Modules and Services questions select every option by default. The migration and Storybook questions default to No. A run with every default answer therefore keeps 23 modules and removes Migrate Plus, Migrate Tools and Storybook.

How modules are configured​

The following table lists the mechanisms that bring a shipped module into a project:

MechanismLocationEffect
Composer requirementrequire in composer.jsonMakes the module available to the site. ➡️ See composer.json
Settings overrideweb/sites/default/includes/modules/settings.<module>.phpApplies configuration for the detected environment, reading values from environment variables. ➡️ See Settings
Config export exclusion$settings['config_exclude_modules'] in a settings overrideKeeps a module that never reaches production out of the exported configuration, so enabling it locally leaves the config unchanged. ➡️ See Settings
Provisioningscripts/provision-00-enable-demo-modules.shBuilds the demo site in the local, ci, dev and stage environments. Applies the recipes/page content model, sets the site name and replaces core's toolbar with core's navigation as the administration interface. Installs the contrib, service and custom site modules, including core's media, then runs their deploy hooks. ➡️ See Provision
Development provisioningscripts/provision-10-enable-dev-modules.shInstalls the modules that never reach production in the same 4 environments: the development tools and the email rerouting safety net. Also installs the Storybook module when Storybook is selected. ➡️ See Provision
Migration provisioningscripts/provision-20-migration.shInstalls the ys_migrate demo migration module, and with it Migrate Plus and Migrate Tools, in every environment except prod. Skips the install when DRUPAL_MIGRATION_SKIP is set to 1. Ships only with the migration feature. ➡️ See Migrations
Module dependencyys_demo.info.ymlInstalls Drupal helpers and Testmode as dependencies of the demo module. ➡️ See Demo module

2 shipped modules are required but never installed:

  • seckit has its settings override in place. Enable the module when the project needs it.
  • Fast 404 runs its handler straight from the settings file, so it needs no install.

1 of the preceding mechanisms installs every other module on the Contributed modules page, so a module you select is enabled after provisioning. Leaving out 2 features each leaves 1 more module required but not installed:

  • Without the demo module, nothing installs Drupal helpers. It arrives only as a dependency of ys_demo.
  • Without the Solr service, nothing installs Search API. The installer removes the line that installs it together with the service.

Check which modules are enabled​

When provisioning runs its custom scripts in the local, ci, dev and stage environments, the output includes the following lines:

  • Installed contrib modules. and Installed custom site modules. from scripts/provision-00-enable-demo-modules.sh, plus 1 line per selected service, such as Installed Redis module.
  • 1 line per development module from scripts/provision-10-enable-dev-modules.sh, such as Installed Devel module., except SDC Devel, which prints Installed Single Directory Component development tools.

In prod and any other environment type, the demo and development scripts print Skipped demo modules operations in production environment. and Skipped installing development modules in production environment. instead.

To list the modules enabled on your local site, run the following command:

ahoy drush pm:list --type=module --status=enabled