Chapter 9. Using Actions and Triggers

IN THIS CHAPTER

  • The default simple actions

  • Adding an advanced action

  • Assigning triggers to actions

Actions and triggers are native Drupal functionalities that work together allowing you to define sets of automatic operations that take place following certain system events. For example, you may want to send an e-mail to the author of an article every time someone comments on it, thus ensuring that he or she can respond to the comment in a timely fashion.

In this chapter, I introduce the default set of Drupal actions, how to go further by creating your own Advanced actions, and finally how you go about connecting system events, called triggers, to defined actions.

Note

Both actions and triggers are core Drupal functionalities. Actions are considered part of the system and cannot be disabled. On the other hand, you will find that triggers, despite being a part of the system core, are disabled by default. You must enable the core Trigger module before you can work with triggers.

The Default Simple Actions

When you set up a standard Drupal installation, you find a number of simple system actions already defined. Navigate to the Actions screen found in the System section of the admin Configuration area, and you see a list of actions as shown in Figure 9.1.

The default Actions screen shows the list of simple actions.

Figure 9-1. The default Actions screen shows the list of simple actions.

The default set of simple actions ...

Get Drupal® 7 Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.