Reference of properties in a Module's description.yaml file

Each module contains a file called description.yaml. This contains information about the module.

This section of the site describes the schema of the description.yaml file.

How the description.yaml file is used

Your description.yaml file will be read by the CMS at the following times:

  • When an administrator clicks "Start module" in the Modules panel in Organizer
  • When a developer increases the revision number of the module in the latest_revision_number.php file in the module's directory, and an administrator logs in and applies database updates.

If you edit your description.yaml file, you MUST increment your module's revision number up by one so that the CMS will read in the change. This happens the next time an administrator tries to log in or go to /admin.

In summary, the description file contains:

  • general information such as name and license information
  • dependencies on other modules
  • whether and how it can be used as a plugin (i.e. appears on a visitor-facing web page)
  • how it may interact with other modules (e.g. sending signals when it takes an action).

Dependencies

If your module extents another module, or needs a feature from another module in order to run, you should state that module's name as a dependency.

The CMS will not allow your module to be started unless all of the modules named as dependencies are also running.

When the CMS runs a module's code, it will always first look for modules that are depended upon, and run them first. For example, if module B depends on module A, A will be run first, and then B.

In the CMS, the module zenario_menu_vertical extends the code of the module zenario_menu, so zenario_menu_vertical lists zenario_menu as a dependency.

A different case would be where a module calls a public static function from another module. If the module relies on this function call to work, then this would be a dependency. However if the function call is optional, and is wrapped in an if statement using the inc() function, then this would not be a dependency as the calling module would not break if the module being called was not running.

Reference of properties: