RegisterModuleDependences( string from_module_id, string event_id, string to_module_id, string to_class = "", string to_method = "", int sort = 100 )
The function RegisterModuleDependences register an event handler.
Parameter | Description |
---|---|
from_module_id | The ID of the module whose event is to be processed. |
event_id | The event ID. |
to_module_id | The ID of the module containing an event handler. |
to_class | Name of a class from the module, whose method is the event handler. Optional. The default value is "" (which tells to include file /bitrix/modules/to_module_id/include.php). |
to_method | Method of a class to_class which is the event handler itself. Optional. The default value is "" (which tells to include file /bitrix/modules/to_module_id/include.php). |
sort | Order in which the registered handler is to be called (more than one handler can be registered for an event). Optional, 100 by default. |
<? // To clean a forum data after the site deletion, // register a handler of "OnUserDelete" event // of the "main" (Kernel) module. // The event handler if the method CForum::OnUserDelete // of the Forum module. RegisterModuleDependences("main", "OnUserDelete", "forum", "CForum", "OnUserDelete"); ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |