Packages from drupal-eca-recipe · Transparency log
-
drupal-eca-recipe/eca_lib_0001
Prints a message when an article node page is requested, using the controller event so that it still fires for cached pages.
-
drupal-eca-recipe/eca_lib_0002
Demonstrates how conditions are combined in ECA, where a successor link carries at most one condition and every combination is therefore built from the arrangement of links. The model shows the three idioms that follow from that constraint. An AND is chained through a pass-through action, an OR is d
-
drupal-eca-recipe/eca_lib_0003
Redirects a request for an unpublished article node to the contact form when the visitor does not hold the core permission for viewing their own unpublished content.
-
drupal-eca-recipe/eca_lib_0004
Demonstrates how to express an if/elseif/else decision in an ECA model, the pattern people usually reach for when they want a PHP switch statement. ECA has neither a switch construct nor a working exclusive gateway, so the model uses the sentinel-default idiom instead: it assigns the default value u
-
drupal-eca-recipe/eca_lib_0005
Compares a user's network references before and after a save to detect exactly which ones were added or removed, and reports each change.
-
drupal-eca-recipe/eca_lib_0006
Loops over every value of a multi-value field without needing a custom event.
-
drupal-eca-recipe/eca_lib_0007
Demonstrates several user account automations together: notifying administrators of new accounts by email, sending users to role-dependent destinations after login, and granting or revoking an internal role from the account's email domain.
-
drupal-eca-recipe/eca_lib_0008
Redirects requests that would return a 403 access denied page to the login form, replacing the Redirect 403 To Login Page module.
-
drupal-eca-recipe/eca_lib_0009
Groups the title and body fields on the article form and blocks publishing while the body is still empty.
-
drupal-eca-recipe/eca_lib_0010
Compares a user's roles before and after a save with two loops, and reports every role that was added or removed.
-
drupal-eca-recipe/eca_lib_0011
Increments a site-wide counter and returns it, keeping the value between requests in ECA's own persistent store rather than in Drupal's state service. An "Acquire lock" action guards the read and the write so that two concurrent requests cannot receive the same number.
-
drupal-eca-recipe/eca_lib_0012
Adds a number field to the user entity and increments it every time that user logs in.
-
drupal-eca-recipe/eca_lib_0013
Tests whether values occur in a pipe-separated list, wrapping each needle in the delimiter so that a partial match cannot report a false positive.
-
drupal-eca-recipe/eca_lib_0014
Two processes that look identical in the diagram but behave differently, showing that successors run in the order they were added rather than the order the model appears to show.
-
drupal-eca-recipe/eca_lib_0015
Shows a message on the user profile edit form, limited to accounts holding one of three selected roles.
-
drupal-eca-recipe/eca_lib_0016
Offers an access-controlled endpoint that queues a user export, runs the view on the next cron run, writes a CSV file and emails the requester a download link.
-
drupal-eca-recipe/eca_lib_0017
Sends an email whenever a node is updated, including the revision log message, which the model also makes a required field. A later version routes the notifications to different recipients depending on moderation state and section.
-
drupal-eca-recipe/eca_lib_0018
Keeps a user field and a profile field in sync in both directions, writing to the other entity only when the values actually differ so the updates cannot loop forever.
-
drupal-eca-recipe/eca_lib_0019
Shows how to drive Views Bulk Operations from a Views listing with ECA.
-
drupal-eca-recipe/eca_lib_0020
Creates an article node whenever a page node is created, building the new title from the page author's name and the page title.
-
drupal-eca-recipe/eca_lib_0021
Responds to events such as logins, registrations, error messages and new comments by sending notifications to email, Mattermost and Alerta.
-
drupal-eca-recipe/eca_lib_0022
Calculates a field value and stores it on the node each time it is created or updated, replacing what the Calculated Field module does.
-
drupal-eca-recipe/eca_lib_0023
Publishes and unpublishes nodes automatically at scheduled dates and times, driven by a view on cron.
-
drupal-eca-recipe/eca_lib_0024
Emails every user holding a given role, using a view with a contextual filter to select the recipients.
-
drupal-eca-recipe/eca_lib_0025
Emails a newly registered user with the values they entered during registration, varying the message depending on whether an optional field was filled in.
-
drupal-eca-recipe/eca_lib_0026
Adds a role to a user once three stored conditions are all met, and removes it again as soon as any of them stops being true.
-
drupal-eca-recipe/eca_lib_0027
Appends a comment to a node author's own user entity whenever they create or update a node.
-
drupal-eca-recipe/eca_lib_0028
Reads form field values during validation and submission, showing how to find the right token syntax for each field type and how building a temporary entity offers a clearer alternative.
-
drupal-eca-recipe/eca_lib_0029
Adds a role to a user on insert or update, comparing three possible approaches and showing why only one of them is reliable.
-
drupal-eca-recipe/eca_lib_0030
Creates a content entity from a JSON string, and shows why the straightforward approach does not work for user entities.
-
drupal-eca-recipe/eca_lib_0031
Reads a date value from a node field and demonstrates the tamper actions that reformat it, shift it by a fixed time range and render it in another time zone.
-
drupal-eca-recipe/eca_lib_0032
Consumes a remote API through the HTTP Client Manager module, then exposes an ECA endpoint of its own with access control and a composed response.
-
drupal-eca-recipe/eca_lib_0033
Follow up to ECA and http services, using a self-defined services API for the HTTP Client Manager. Requires the ECA TV Demo module, which supplies that services API.
-
drupal-eca-recipe/eca_lib_0034
Contrasts the Views execute query action, which returns entities, with the render Views action, which returns rendered output.
-
drupal-eca-recipe/eca_lib_0035
A variant of the insert-or-update role model that acts only on newly created users.
-
drupal-eca-recipe/eca_lib_0036
Subscribes or unsubscribes users from a Simplenews newsletter on user presave, based on the roles they hold. Requires the eca_simplenews module.
-
drupal-eca-recipe/eca_lib_0037
Provides two HTMX blocks: a digital clock that refreshes once a second, and a block that loads the content of a node when clicked.
-
drupal-eca-recipe/eca_lib_0038
Sends the article text to an AI chat model on presave and writes the structured answer into real node fields: body summary, SEO meta description, reading time, sentiment and Tags terms. Triggered by node entity presave, guarded so that each article is enriched only once. Requires the Standard profil
-
drupal-eca-recipe/eca_lib_0039
Adds an edit link to the rendered output of a node in the teaser view mode. The link points to the node's edit form and sits beside the title, not inside it. A scalar condition keeps this teaser-only, an update access check limits the link to users who may edit the node, and a user.permissions cache
-
drupal-eca-recipe/eca_lib_0040
Provides a Location content type with dependent Country, State or province, and City select fields. ECA adds Ajax handlers and populates the downstream options from a compact demonstration data set.
-
drupal-eca-recipe/eca_lib_0041
Adds two ECA-powered buttons to entity form widgets. One returns three suggested titles and offers them in a dialog, the other writes a single computed byline straight into the field. Both are deterministic and use no AI. The recipe brings in core's Article content type, ships the Article form displ
-
drupal-eca-recipe/eca_lib_0042
Adds a Topic field and a Generate draft button to the Article node form. Selecting the button sends an Ajax request that fills the title, the body summary and the body text in one go, without reloading the page and without saving the node. The topic is required for the button but not for saving, and
-
drupal-eca-recipe/eca_lib_0043
Adds a Show writing tips panel to the Article node form. Selecting it fetches a fragment from an ECA endpoint over HTMX and swaps it into the panel, without submitting, validating or rebuilding the form and without changing any field. Completes the set of three form button samples: a field widget ac
-
drupal-eca-recipe/eca_lib_0044
Published Article nodes cannot be deleted until they are unpublished. The model answers the entity access question with 'forbidden' instead of hiding buttons, so the Delete tab, the operations link and the form's Delete button all disappear together and the delete route returns 403.
-
drupal-eca-recipe/eca_lib_0045
Separates two questions that are routinely conflated: whether a field changed, and what its previous value was. The condition Entity: field value changed answers the first on its own, with no original entity, no token and no loop. Only the message text needs the old title, so the model additionally
-
drupal-eca-recipe/eca_lib_0046
One model building an editorial desk: a composite block assembled element by element from a heading, a dropbutton, an embedded view and a details panel; a deferred region resolved through a lazy element; an endpoint serving JSON, an HTMX fragment and a bare timestamp with per-branch status codes, he
-
drupal-eca-recipe/eca_lib_0047
Adds selected nodes to a group from a view, taking the group from the view argument instead of the model, and offering the operation only to group members.
-
drupal-eca-recipe/eca_test_0001
Cross references
-
drupal-eca-recipe/eca_test_0002
Entity Events Part 1
-
drupal-eca-recipe/eca_test_0003
Entity Events Part 2
-
drupal-eca-recipe/eca_test_0004
Basic entity tests
-
drupal-eca-recipe/eca_test_0006
Write Log Message
-
drupal-eca-recipe/eca_test_0007
Redirects for deleted entities
-
drupal-eca-recipe/eca_test_0008
Save new entity
-
drupal-eca-recipe/eca_test_0009
Set field values
-
drupal-eca-recipe/eca_test_0010
Forward tokens to custom event
-
drupal-eca-recipe/notify_new_comments
Notify by email: New Comments