Settings API

Categories

RDF

Component ID

1617894

Component name

Settings API

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This module provides a framework for integration between the entity metadata API and Drupal variables.

Settings API is useful for situations where you want to use client-defined values in Rules but you do not want to package those values in Rules definitions. A good example of this is tokenized templates. This module lets you treat these as content rather than configuration and avoid having to package them with your feature.

Use-case 1: You want to use this module to track email template content outside of your feature. There is a submodule called "Settings API Mail" to handle this.

  1. hook_settings_api_mail_mail_types() to define your mail template
  2. Set up a "send email" rules action and point the "body" and "subject" data selectors to the respective metadata properties provided by Settings API

Use-case 2: You want to expose Drupal variables as entity metadata.

  • Use hook_settings_api_variable_properties() to define your variables to the entity metadata framework. They will now be accessible in rules off whatever entity type you specified for "attach."

The target audience of this module is developers, specifically those who use keep Features in version control and want to allow clients to define tokenized templates that do not have to be stored in Features Rules configuration.

Included modules

Settings API: core API module
Settings API Mail: provides UI and API for mail template definition
Settings API Example: provides example content