Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
title/components/modules/my_module/config.json
{
    "version": "1.0.0",
    "name": "My Module Name",
    "description": "A module like no other!",
    "authors": [
        {
            "name": "Phillips Data, Inc.",
            "url": "http://www.blesta.com"
        }
    ],
	"package": {
		"name_key": "input_name_key"
	},
    "service": {
        "name_key": "service_field_key"
    },
    "module": {
        "row": "Signular Form of Module Row",
        "rows": "Plural Form of Module Row",
        "group": "Module Group Name",
        "row_key": "module_row_field_key"
    },
	"email_tags": {
		"module": ["tag_one", "tag_two"],
		"package": ["type", "package"],
		"service": ["service_field_key", "service_field_username"],
	}
}

Definition

OptionDescription
versionThe version of the module. This should be a semantic version number.
nameThe name of the module. This may also be a language definition.
description

A brief description of the module.

Note

Planned for future use.


authors

An array of author objects.

OptionDescription
nameThe name of the author. This may be a language definition
urlThe URL to link to for the author.


logoThe path within the module to the logo file. If not set, defaults to views/default/images/logo.png.
package

An object of service settings.

OptionDescription
name_keyThe value of the input key in $vars that represents the package's label before it becomes a service (e.g. if your module registers domains, this might be domain).


service

An object of service settings.

OptionDescription
name_keyThe value of service_fields.key used to identify a service's label (e.g. if your module registers domains, this might be domain).


module

An object of module settings.

OptionDescription
rowThe singular form of the noun used to describe a module row (e.g. if your module registers domain, this might be Registrar Account). This may also be a language definition.
rowsThe plural form of the noun used to describe the module row (e.g. Registrar Accounts). This may also be a language definition.
groupThe noun used to describe a collection of module rows (e.g. Registrar Accounts). This may also be a language definition.
row_keyThe value of module_row_meta.key used to identify a module row.


email_tags

An object containing tags for the module, service, package, and any other tag groups, each of which contain an array of strings representing each tag in that group.

These tags will be displayed when an admin configures the welcome email template.

Using the Configuration

To use the configuration file you must include it within the constructor of your module using the loadConfig() method.

...