d7-events
Installation
SKILL.md
Bitrix D7 Events
When to use
- The user needs to control the order in which handlers run for an event — setting the sort/priority argument so one handler runs before or after another.
- The user is declaring a module's event handlers — registering them from the
module's
include.php/installer, or hooking events of another module such asmain:OnBeforeUserAddorsale:OnSaleOrderSaved. - The user needs to register an event handler —
EventManager::addEventHandler()(D7) or the legacyAddEventHandler()— to react to a module or system event. - The user is firing a custom event so other code can hook in — constructing an
\Bitrix\Main\Eventand calling$event->send(), or reading results back from its handlers.