Glossary
Last updated on
30 January 2022
- Reaction rules
- Rules configuration that triggers on selected events on your site. Each reaction rule may contain several (triggering) events, in addition to (optional) conditions and actions.
- Events
- Used to trigger reaction rules. Each event may provide any number of context variables for the rule to act on. Events are often tightly coupled to Drupal "hooks".
- Actions
- The things carried out by rules. Actions could be sending messages or redirecting site users, but actions can also manipulate variables available to the rule – such as changing a node title or published state. A particularly useful action is Set a data value.
- Conditions
- Can be added to rules in order to have actions executed only when certain criteria are met, such as a user having a specified role or a node being older than a month. Conditions may be combined into and and or groups. A particularly useful condition is Data comparison.
- Components
- Stand-alone Rules configuration, that can be reused by Rules, other modules, and also called programmatically from code. Components are useful for making complex configuration easier to reuse and maintain.
- Variables
- The input and output of Rules plugins and components. All variables belong to a certain type, such as nodes (content), taxonomy terms, text strings or dates. Each data type can also be present in lists, such as a list of users. Data types rely to a large extent on the core Drupal Typed Data API.
- Data selection
- An input method used in Rules configuration, allowing the administrator to drill through the data known to Rules in that particular setting. Two advantages of data selection is that it (1) is sensitive to restrictions on data types and (2) allows exploring "chained" data – for example using
node:author:…
to explore properties of a node's author (without the user object being explicitly loaded in Rules). - Direct input
- An input method used in Rules configuration, allowing the administrator enter text that (optionally) contains Tokens, for use by Rules Conditions and Actions.
- Plugins
- The foundation for the module's reusable configurations. Actions, conditions, events, and components are all plugins. Also the UI is reusable on a plugin basis by using the methods as defined by the RulesPluginUIInterface. It's possible to embed a form for managing a bunch of user created components or reaction rules, e.g. restricted to the events a module provides.
- Elements
- The instances of a plugin in a configuration. When configuring a rule, each element is configured by setting the necessary options. Nesting elements, such as beneath an AND or LOOP plugin in the UI, forms a parent/child array of embedded elements, which are controlled by each plugin's definition of which types of plugins are embeddable beneath it. This is used in UI for restricting "draggability".
- Context
- TBD.
- Tokens
- Placeholders for data variables. Tokens may be used in Direct input mode to designate where and what kind of variable values appear in text strings.
- Data filters
- Data filters appear inside Tokens, and are used to manipulate the Token data for display. For example, changing the Token text to lowercase, or providing a default value for when the Token does not have a value.
- Entity
- Since we talk about entities everywhere, it would be good to define them here.
- Machine name
- A unique, non-translatable string that is used internally to identify Rules and other entities in Drupal. This string is what appears in the Rules configurations files and on the Rules edit page. Machine names are far more important to developers than site builders.
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion