System Events
From MODx Wiki
A System Event is triggered at a certain time during script execution using the invokeEvent function. It allows developers to inject pieces of code (known as plugins) in to the framework without having to edit the MODx core.
Contents |
Frontend System Events
These events are called at various times during frontend execution, to see when these events are called, see Order of execution.
Template Service Events
Template Service Events are all the events that relate to the display of a page in the MODx CMS. Here is a list of all Template Service Events as of version 0.9.5.
- OnDocPublished - A document has been Published.
- OnDocUnPublished - A document has been Unpublished.
- OnLoadWebDocument - Document loaded from database.
- OnLogPageHit - Called only when visitor tracking is on.
- OnParseDocument - Called just before tvs, chunks, snippets, etc. are parsed.
- OnWebPageComplete - Called only when visitor tracking is on.
- OnWebPageInit - Called after the cache has been loaded into $modx
- OnWebPagePrerender - Called just before the page is pushed to the client.
Cache Service Events
Cache Service Events relate to the cache files maintained in the /assets/cache/ directory of the MODx CMS. This is a list of all Cache Service Events as of version 0.9.5.
- OnBeforeCacheUpdate - Just before the new cache file is written.
- OnBeforeSaveWebPageCache - A document is saved to the cache.
- OnCacheUpdate - Right after the cache file is written.
- OnLoadWebPageCache - A document is loaded from cache.
Parser Service Events
Parser Service Events include miscellaneous events invoked during DocumentParser execution.
Web Access Service Events
Web Access Service Events are called from within the WebLogin snippet.
- OnBeforeWebLogin
- OnBeforeWebLogout
- OnWebAuthentication
- OnWebChangePassword
- OnWebCreateGroup
- OnWebDeleteUser
- OnWebLogin
- OnWebLogout
- OnWebSaveUser
Backend System Events
These events are called while using the Manager Interface.
Manager Access Events
Manager Access Events involve various actions having to do with manager users, and logging in/out.
- OnBeforeManagerLogin
- OnBeforeManagerLogout
- OnBeforeManagerPageInit
- OnManagerAuthentication
- OnManagerChangePassword
- OnManagerCreateGroup
- OnManagerDeleteUser
- OnManagerLogin
- OnManagerLoginFormRender
- OnManagerLogout
- OnManagerPageInit
- OnManagerSaveUser
Chunks
Chunk System Events involve actions during manipulation of chunks.
- OnBeforeChunkFormDelete
- OnBeforeChunkFormSave
- OnChunkFormDelete
- OnChunkFormPrerender
- OnChunkFormRender
- OnChunkFormSave
Documents
Document System Events are related to document manipulation (creation, modification, duplication, etc.).
- OnBeforeDocFormDelete
- OnBeforeDocFormSave
- OnCreateDocGroup
- OnDocFormDelete
- OnDocFormPrerender
- OnDocFormRender
- OnDocFormSave
Modules
- OnBeforeModFormDelete
- OnBeforeModFormSave
- OnModFormDelete
- OnModFormPrerender
- OnModFormRender
- OnModFormSave
Plugins
- OnBeforePluginFormDelete
- OnBeforePluginFormSave
- OnPluginFormDelete
- OnPluginFormPrerender
- OnPluginFormRender
- OnPluginFormSave
RichText Editor Events
The two RichText Editor Events are for use when creating an alternative javascript text editor.
Snippets
- OnBeforeSnipFormDelete
- OnBeforeSnipFormSave
- OnSnipFormDelete
- OnSnipFormPrerender
- OnSnipFormRender
- OnSnipFormSave
System Settings
- OnFriendlyURLSettingsRender
- OnInterfaceSettingsRender
- OnMiscSettingsRender
- OnSiteSettingsRender
- OnUserSettingsRender
Template Variables
- OnBeforeTVFormDelete
- OnBeforeTVFormSave
- OnTVFormDelete
- OnTVFormPrerender
- OnTVFormRender
- OnTVFormSave
Templates
- OnBeforeTempFormDelete
- OnBeforeTempFormSave
- OnTempFormDelete
- OnTempFormPrerender
- OnTempFormRender
- OnTempFormSave
Users
- OnBeforeUserFormDelete
- OnBeforeUserFormSave
- OnUserFormDelete
- OnUserFormPrerender
- OnUserFormRender
- OnUserFormSave
Web Users
- OnBeforeWUsrFormDelete
- OnBeforeWUsrFormSave
- OnWUsrFormDelete
- OnWUsrFormPrerender
- OnWUsrFormRender
- OnWUsrFormSave
