System Events Fired in the MODX Code

This list of MODX System Events shows the file(s) they occur in, and the variables sent to each event. Events appear more than once in the list because they are fired in multiple places.

Use the alphabetized links below to jump to a particular event. Scroll up to see the file in which the event is fired.

The first three events are called using a variable for the event name. The first one, in the modTemplateVar class, represents either OnTVOutputRenderList or OnTVInputRenderList — the variables are the same for both events. The other two are in the user/update processor. They represent one of the four following events: OnBeforeUserActivate, OnUserActivate, OnBeforeUserDeactivate, OnUserDeactivate — the variables are the same for all four events.



$event
$event
$event
$this
$this
$this
$this
$this
$this
$this
OnBeforeCacheUpdate
OnBeforeCacheUpdate
OnBeforeCacheUpdate
OnBeforeChunkFormDelete
OnBeforeChunkFormSave
OnBeforeChunkFormSave
OnBeforeDocFormDelete
OnBeforeDocFormDelete
OnBeforeDocFormSave
OnBeforeDocFormSave
OnBeforeDocFormSave
OnBeforeDocFormSave
OnBeforeDocFormSave
OnBeforeEmptyTrash
OnBeforeEmptyTrash
OnBeforeManagerLogin
OnBeforeManagerLogout
OnBeforeManagerPageInit
OnBeforeManagerPageInit
OnBeforePluginFormDelete
OnBeforePluginFormSave
OnBeforePluginFormSave
OnBeforeResourceGroupRemove
OnBeforeSaveWebPageCache
OnBeforeSnipFormDelete
OnBeforeSnipFormSave
OnBeforeSnipFormSave
OnBeforeTVFormDelete
OnBeforeTVFormSave
OnBeforeTVFormSave
OnBeforeTempFormDelete
OnBeforeTempFormSave
OnBeforeTempFormSave
OnBeforeUserActivate
OnBeforeUserDeactivate
OnBeforeUserFormDelete
OnBeforeUserFormDelete
OnBeforeUserFormSave
OnBeforeUserFormSave
OnBeforeUserFormSave
OnBeforeWebLogin
OnBeforeWebLogout
OnCacheUpdate
OnCacheUpdate
OnCategoryBeforeRemove
OnCategoryBeforeSave
OnCategoryRemove
OnCategorySave
OnChunkBeforeRemove
OnChunkBeforeSave
OnChunkFormDelete
OnChunkFormPrerender
OnChunkFormPrerender
OnChunkFormPrerender
OnChunkFormPrerender
OnChunkFormRender
OnChunkFormRender
OnChunkFormRender
OnChunkFormRender
OnChunkFormSave
OnChunkFormSave
OnChunkRemove
OnChunkSave
OnContextBeforeRemove
OnContextBeforeSave
OnContextFormPrerender
OnContextFormPrerender
OnContextFormRender
OnContextFormRender
OnContextRemove
OnContextSave
OnContextUpdate
OnContextUpdate
OnContextUpdate
OnDocFormDelete
OnDocFormDelete
OnDocFormPrerender
OnDocFormPrerender
OnDocFormPrerender
OnDocFormPrerender
OnDocFormPrerender
OnDocFormPrerender
OnDocFormPrerender
OnDocFormPrerender
OnDocFormPrerender
OnDocFormRender
OnDocFormRender
OnDocFormRender
OnDocFormRender
OnDocFormRender
OnDocFormRender
OnDocFormRender
OnDocFormRender
OnDocFormRender
OnDocFormSave
OnDocFormSave
OnDocFormSave
OnDocFormSave
OnDocFormSave
OnDocPublished
OnDocPublished
OnDocUnPublished
OnDocUnPublished
OnElementNotFound
OnEmptyTrash
OnEmptyTrash
OnFileCreateFormPrerender
OnFileEditFormPrerender
OnFileEditFormPrerender
OnFileManagerBeforeUpload
OnFileManagerDirCreate
OnFileManagerDirRemove
OnFileManagerDirRename
OnFileManagerFileCreate
OnFileManagerFileRemove
OnFileManagerFileRename
OnFileManagerFileUpdate
OnFileManagerMoveObject
OnFileManagerUpload
OnFileManagerUpload
OnFileManagerUpload
OnFileManagerUpload
OnHandleRequest
OnHandleRequest
OnInitCulture
OnLoadWebDocument
OnLoadWebPageCache
OnManagerAuthentication
OnManagerLogin
OnManagerLoginFormPrerender
OnManagerLoginFormPrerender
OnManagerLoginFormRender
OnManagerLoginFormRender
OnManagerLogout
OnManagerPageAfterRender
OnManagerPageBeforeRender
OnManagerPageInit
OnMediaSourceDuplicate
OnMediaSourceGetProperties
OnPageNotFound
OnPageUnauthorized
OnParseDocument
OnParseDocument
OnPluginBeforeRemove
OnPluginBeforeSave
OnPluginEventBeforeRemove
OnPluginEventBeforeSave
OnPluginEventRemove
OnPluginEventSave
OnPluginFormDelete
OnPluginFormPrerender
OnPluginFormPrerender
OnPluginFormPrerender
OnPluginFormPrerender
OnPluginFormRender
OnPluginFormRender
OnPluginFormRender
OnPluginFormRender
OnPluginFormSave
OnPluginFormSave
OnPluginRemove
OnPluginSave
OnPropertySetBeforeRemove
OnPropertySetBeforeSave
OnPropertySetRemove
OnPropertySetSave
OnResourceAddToResourceGroup
OnResourceAddToResourceGroup
OnResourceAddToResourceGroup
OnResourceAutoPublish
OnResourceBeforeSort
OnResourceBeforeSort
OnResourceDelete
OnResourceDelete
OnResourceDelete
OnResourceDelete
OnResourceDelete
OnResourceDuplicate
OnResourceDuplicate
OnResourceGroupBeforeSave
OnResourceGroupRemove
OnResourceGroupSave
OnResourceRemoveFromResourceGroup
OnResourceRemoveFromResourceGroup
OnResourceRemoveFromResourceGroup
OnResourceSort
OnResourceSort
OnResourceTVFormPrerender
OnResourceTVFormPrerender
OnResourceTVFormRender
OnResourceTVFormRender
OnResourceToolbarLoad
OnResourceToolbarLoad
OnResourceUndelete
OnResourceUndelete
OnResourceUndelete
OnResourceUndelete
OnResourceUndelete
OnRichTextBrowserInit
OnRichTextBrowserInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorInit
OnRichTextEditorRegister
OnRichTextEditorRegister
OnRichTextEditorRegister
OnRichTextEditorRegister
OnRichTextEditorRegister
OnRichTextEditorRegister
OnRichTextEditorRegister
OnRichTextEditorRegister
OnRichTextEditorRegister
OnRichTextEditorRegister
OnRichTextEditorRegister
OnSiteRefresh
OnSiteRefresh
OnSiteRefresh
OnSiteSettingsRender
OnSiteSettingsRender
OnSnipFormDelete
OnSnipFormPrerender
OnSnipFormPrerender
OnSnipFormPrerender
OnSnipFormPrerender
OnSnipFormRender
OnSnipFormRender
OnSnipFormRender
OnSnipFormRender
OnSnipFormSave
OnSnipFormSave
OnSnippetBeforeRemove
OnSnippetBeforeSave
OnSnippetRemove
OnSnippetSave
OnTVFormDelete
OnTVFormPrerender
OnTVFormPrerender
OnTVFormPrerender
OnTVFormPrerender
OnTVFormRender
OnTVFormRender
OnTVFormRender
OnTVFormRender
OnTVFormSave
OnTVFormSave
OnTVInputPropertiesList
OnTVInputRenderList
OnTVInputRenderList
OnTVOutputRenderList
OnTVOutputRenderList
OnTVOutputRenderPropertiesList
OnTempFormDelete
OnTempFormPrerender
OnTempFormPrerender
OnTempFormPrerender
OnTempFormPrerender
OnTempFormRender
OnTempFormRender
OnTempFormRender
OnTempFormRender
OnTempFormSave
OnTempFormSave
OnTemplateBeforeRemove
OnTemplateBeforeSave
OnTemplateRemove
OnTemplateSave
OnTemplateVarBeforeRemove
OnTemplateVarBeforeSave
OnTemplateVarRemove
OnTemplateVarSave
OnUserActivate
OnUserAddToGroup
OnUserBeforeAddToGroup
OnUserBeforeRemove
OnUserBeforeRemoveFromGroup
OnUserBeforeSave
OnUserChangePassword
OnUserDeactivate
OnUserFormDelete
OnUserFormPrerender
OnUserFormPrerender
OnUserFormPrerender
OnUserFormPrerender
OnUserFormRender
OnUserFormRender
OnUserFormRender
OnUserFormRender
OnUserFormSave
OnUserFormSave
OnUserGroupBeforeFormRemove
OnUserGroupBeforeFormSave
OnUserGroupBeforeFormSave
OnUserGroupBeforeRemove
OnUserGroupBeforeSave
OnUserGroupFormRemove
OnUserGroupFormSave
OnUserGroupFormSave
OnUserGroupRemove
OnUserGroupSave
OnUserNotFound
OnUserNotFound
OnUserRemove
OnUserRemoveFromGroup
OnUserSave
OnWebAuthentication
OnWebLogin
OnWebLogout
OnWebPageComplete
OnWebPageInit
OnWebPagePrerender
OnWebPagePrerender
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
name
nome
název

core/lexicon/zh/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/nl/events.inc.php

    Event: name
    Variables: properties) aanroep.';

Back to Top

core/lexicon/es/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/uk/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/de/events.inc.php

    Event: name
    Variables: eigenschaften) benutzen können.';

Back to Top

core/lexicon/he/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/da/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/cs/events.inc.php

    Event: název
    Variables: vlastnosti).';

Back to Top

core/lexicon/ja/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/bg/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/et/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/fi/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/it/events.inc.php

    Event: name
    Variables: properties) .';

Back to Top

core/lexicon/pt-br/events.inc.php

    Event: nome
    Variables: Propriedades).';

Back to Top

core/lexicon/be/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/pl/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/th/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/hi/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/hu/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/fa/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/id/events.inc.php

    Event: name
    Variables: properties).';

Back to Top

core/lexicon/el/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/fr/events.inc.php

    Event: name
    Variables: properties)';

Back to Top

core/lexicon/en/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/ar/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/lexicon/ro/events.inc.php

    Event: name
    Variables: properties) call.';

Back to Top

core/model/modx/modresourcegroup.class.php

    Event: OnResourceGroupBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'resourceGroup' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnResourceGroupSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'resourceGroup' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnBeforeResourceGroupRemove
    Variables: array(
        'resourceGroup' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnResourceGroupRemove
    Variables: array(
        'resourceGroup' => &$this,
        'ancestors' => $ancestors,
    );

Back to Top

core/model/modx/modtemplate.class.php

    Event: OnTemplateBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'template' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnTemplateSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'template' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnTemplateBeforeRemove
    Variables: array(
        'template' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnTemplateRemove
    Variables: array(
        'template' => &$this,
        'ancestors' => $ancestors,
    );

Back to Top

core/model/modx/modchunk.class.php

    Event: OnChunkBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'chunk' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnChunkSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'chunk' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnChunkBeforeRemove
    Variables: array(
        'chunk' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnChunkRemove
    Variables: array(
        'chunk' => &$this,
        'ancestors' => $ancestors,
    );

Back to Top

core/model/modx/modplugin.class.php

    Event: OnPluginBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'plugin' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnPluginSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'plugin' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnPluginBeforeRemove
    Variables: array(
        'plugin' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnPluginRemove
    Variables: array(
        'plugin' => &$this,
        'ancestors' => $ancestors,
    );

Back to Top

core/model/modx/processors/context/updatefromgrid.class.php

    Event: OnContextUpdate
    Variables: array(
        'context' => &$this->context,
        'properties' => $this->getProperties(),
    );

Back to Top

core/model/modx/processors/context/updatefromgrid.php

    Event: OnContextUpdate
    Variables: array(
        'context' => &$context,
    );

Back to Top

core/model/modx/processors/context/update.class.php

    Event: OnContextUpdate
    Variables: array(
        'context' => &$this->object,
        'properties' => $this->getProperties(),
    );

Back to Top

core/model/modx/processors/system/clearcache.php

    Event: OnBeforeCacheUpdate
    Variables: None

    Event: OnSiteRefresh
    Variables: array(
        'results' => $results,
        'partitions' => $partitions
    );

Back to Top

core/model/modx/processors/system/rte/getlist.class.php

    Event: OnRichTextEditorRegister
    Variables: None

Back to Top

core/model/modx/processors/system/rte/getlist.php

    Event: OnRichTextEditorRegister
    Variables: None

Back to Top

core/model/modx/processors/system/clearcache.class.php

    Event: OnSiteRefresh
    Variables: array(
        'results' => $results,
        'partitions' => $partitions,
    );

    Event: OnBeforeCacheUpdate
    Variables: None

Back to Top

core/model/modx/processors/security/logout.php

    Event: OnBeforeManagerLogout
    Variables: array(
        'userid' => $modx->user->get('id'),
        'username' => $modx->user->get('username'),
        'user' => &$modx->user,
        'loginContext' => &$loginContext,
        'addContexts' => &$addContexts
    );

    Event: OnBeforeWebLogout
    Variables: array(
        'userid' => $modx->user->get('id'),
        'username' => $modx->user->get('username'),
        'user' => &$modx->user,
        'loginContext' => &$loginContext,
        'addContexts' => &$addContexts
    );

    Event: OnManagerLogout
    Variables: array(
        'userid' => $modx->user->get('id'),
        'username' => $modx->user->get('username'),
        'user' => &$modx->user,
        'loginContext' => &$loginContext,
        'addContexts' => &$addContexts
    );

    Event: OnWebLogout
    Variables: array(
        'userid' => $modx->user->get('id'),
        'username' => $modx->user->get('username'),
        'user' => &$modx->user,
        'loginContext' => &$loginContext,
        'addContexts' => &$addContexts
    );

Back to Top

core/model/modx/processors/security/user/create.php

    Event: OnBeforeUserFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'user' => &$user,
    );

    Event: OnUserFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'user' => &$user,
        'id' => $user->get('id'),
    );

Back to Top

core/model/modx/processors/security/user/activatemultiple.class.php

    Event: OnBeforeUserActivate
    Variables: array(
        'id' => $userId,
        'user' => &$user,
        'mode' => 'multiple',
    );

    Event: OnUserActivate
    Variables: array(
        'id' => $userId,
        'user' => &$user,
        'mode' => 'multiple',
    );

Back to Top

core/model/modx/processors/security/user/removemultiple.php

    Event: OnBeforeUserFormDelete
    Variables: array(
        'ids' => $userIds,
    );

Back to Top

core/model/modx/processors/security/user/delete.php

    Event: OnBeforeUserFormDelete
    Variables: array(
        'user' => &$user,
        'id' => $user->get('id'),
    );

    Event: OnUserFormDelete
    Variables: array(
        'id' => $user->get('id'),
        'user' => &$user,
    );

Back to Top

core/model/modx/processors/security/user/updatefromgrid.php

    Event: OnBeforeUserFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'user' => &$user,
        'id' => $user->get('id'),
    );

Back to Top

core/model/modx/processors/security/user/update.class.php

    Event: $event
    Variables: array(
        'id' => $this->object->get('id'),
        'user' => &$this->object,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: $event
    Variables: array(
        'id' => $this->object->get('id'),
        'user' => &$this->object,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

core/model/modx/processors/security/user/update.php

    Event: OnBeforeUserFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'user' => &$user,
        'id' => $user->get('id'),
    );

    Event: OnUserFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'user' => &$user,
        'id' => $user->get('id'),
    );

Back to Top

core/model/modx/processors/security/user/deactivatemultiple.class.php

    Event: OnBeforeUserDeactivate
    Variables: array(
        'id' => $userId,
        'user' => &$user,
        'mode' => 'multiple',
    );

    Event: OnUserDeactivate
    Variables: array(
        'id' => $userId,
        'user' => &$user,
        'mode' => 'multiple',
    );

Back to Top

core/model/modx/processors/security/resourcegroup/updateresourcesin.class.php

    Event: $this
    Variables: array(
        'mode' => 'resource-group-tree-drag',
        'resource' => &$this->resource,
        'resourceGroup' => &$this->resourceGroup,
    );

Back to Top

core/model/modx/processors/security/resourcegroup/updateresourcesin.php

    Event: OnResourceAddToResourceGroup
    Variables: array(
        'mode' => 'resource-group-tree-drag',
        'resource' => &$resource,
        'resourceGroup' => &$resourceGroup,
    );

Back to Top

core/model/modx/processors/security/resourcegroup/removeresource.class.php

    Event: OnResourceRemoveFromResourceGroup
    Variables: array(
        'mode' => 'resource-group-tree-remove-resource',
        'resource' => &$this->resource,
        'resourceGroup' => &$this->resourceGroup,
    );

Back to Top

core/model/modx/processors/security/logout.class.php

    Event: $this
    Variables: OnBeforeManagerLogout' : 'OnBeforeWebLogout', array(
        'userid' => $this->modx->user->get('id'),
        'username' => $this->modx->user->get('username'),
        'user' => &$this->modx->user,
        'loginContext' => &$this->loginContext,
        'addContexts' => &$this->addContexts
    );

    Event: $this
    Variables: OnManagerLogout' : 'OnWebLogout', array(
        'userid' => $this->modx->user->get('id'),
        'username' => $this->modx->user->get('username'),
        'user' => &$this->modx->user,
        'loginContext' => &$this->loginContext,
        'addContexts' => &$this->addContexts
    );

Back to Top

core/model/modx/processors/security/login.class.php

    Event: $this
    Variables: OnBeforeManagerLogin" : "OnBeforeWebLogin", $onBeforeLoginParams

    Event: OnUserNotFound
    Variables: $OnUserNotFoundParams

    Event: $this
    Variables: OnManagerAuthentication" : "OnWebAuthentication", $loginParams

    Event: $this
    Variables: OnManagerLogin" : "OnWebLogin", $postLoginParams

Back to Top

core/model/modx/processors/security/group/create.php

    Event: OnUserGroupBeforeFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'usergroup' => &$usergroup,
        'id' => $usergroup->get('id'),
    );

    Event: OnUserGroupFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'usergroup' => &$usergroup,
        'id' => $usergroup->get('id'),
    );

Back to Top

core/model/modx/processors/security/group/removeuser.php

    Event: OnUserBeforeRemoveFromGroup
    Variables: array(
        'user' => &$user,
        'usergroup' => &$usergroup,
        'membership' => &$membership,
    );

    Event: OnUserRemoveFromGroup
    Variables: array(
        'user' => &$user,
        'usergroup' => &$usergroup,
        'membership' => &$membership,
    );

Back to Top

core/model/modx/processors/security/group/adduser.php

    Event: OnUserBeforeAddToGroup
    Variables: array(
        'user' => &$user,
        'usergroup' => &$usergroup,
        'membership' => &$membership,
    );

    Event: OnUserAddToGroup
    Variables: array(
        'user' => &$user,
        'usergroup' => &$usergroup,
        'membership' => &$membership,
    );

Back to Top

core/model/modx/processors/security/group/remove.php

    Event: OnUserGroupBeforeFormRemove
    Variables: array(
        'usergroup' => &$usergroup,
        'id' => $usergroup->get('id'),
    );

    Event: OnUserGroupFormRemove
    Variables: array(
        'usergroup' => &$usergroup,
        'id' => $usergroup->get('id'),
    );

Back to Top

core/model/modx/processors/security/group/update.php

    Event: OnUserGroupBeforeFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'usergroup' => &$usergroup,
        'id' => $usergroup->get('id'),
    );

    Event: OnUserGroupFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'usergroup' => &$usergroup,
        'id' => $usergroup->get('id'),
    );

Back to Top

core/model/modx/processors/security/login.php

    Event: OnBeforeManagerLogin
    Variables: $onBeforeLoginParams

    Event: OnBeforeWebLogin
    Variables: $onBeforeLoginParams

    Event: OnUserNotFound
    Variables: array(
        'user' => &$user,
        'username' => $username,
        'password' => $givenPassword,
        'attributes' => array(
        'rememberme' => $rememberme,
        'lifetime' => $lifetime,
        'loginContext' => $loginContext,
        'addContexts' => $addContexts, )
    );

    Event: OnManagerAuthentication
    Variables: $loginAttributes

    Event: OnWebAuthentication
    Variables: $loginAttributes

    Event: OnManagerLogin
    Variables: $postLoginAttributes

    Event: OnWebLogin
    Variables: $postLoginAttributes

Back to Top

core/model/modx/processors/browser/file/upload.php

    Event: OnFileManagerUpload
    Variables: array(
        'files' => &$_FILES,
        'directory' => &$directory,
    );

Back to Top

core/model/modx/processors/browser/directory/upload.php

    Event: OnFileManagerUpload
    Variables: array(
        'files' => &$_FILES,
        'directory' => &$directory,
    );

Back to Top

core/model/modx/processors/element/template/create.php

    Event: OnBeforeTempFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => 0,
        'template' => &$template,
    );

    Event: OnTempFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => $template->get('id'),
        'template' => &$template,
    );

Back to Top

core/model/modx/processors/element/template/remove.php

    Event: OnBeforeTempFormDelete
    Variables: array(
        'id' => $template->get('id'),
        'template' => &$template,
    );

    Event: OnTempFormDelete
    Variables: array(
        'id' => $template->get('id'),
        'template' => &$template,
    );

Back to Top

core/model/modx/processors/element/template/update.php

    Event: OnBeforeTempFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $template->get('id'),
        'template' => &$template,
    );

    Event: OnTempFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $template->get('id'),
        'template' => &$template,
    );

Back to Top

core/model/modx/processors/element/chunk/create.php

    Event: OnBeforeChunkFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => 0,
        'data' => $chunk->toArray(),
        'chunk' => &$chunk,
    );

    Event: OnChunkFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => $chunk->get('id'),
        'chunk' => &$chunk,
    );

Back to Top

core/model/modx/processors/element/chunk/remove.php

    Event: OnBeforeChunkFormDelete
    Variables: array(
        'id' => $chunk->get('id'),
        'chunk' => &$chunk,
    );

    Event: OnChunkFormDelete
    Variables: array(
        'id' => $chunk->get('id'),
        'chunk' => &$chunk,
    );

Back to Top

core/model/modx/processors/element/chunk/update.php

    Event: OnBeforeChunkFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $chunk->get('id'),
        'chunk' => &$chunk,
    );

    Event: OnChunkFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $chunk->get('id'),
        'chunk' => &$chunk,
    );

Back to Top

core/model/modx/processors/element/snippet/create.php

    Event: OnBeforeSnipFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => 0,
        'snippet' => &$snippet,
    );

    Event: OnSnipFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => $snippet->get('id'),
        'snippet' => &$snippet,
    );

Back to Top

core/model/modx/processors/element/snippet/remove.php

    Event: OnBeforeSnipFormDelete
    Variables: array(
        'id' => $snippet->get('id'),
        'snippet' => &$snippet,
    );

    Event: OnSnipFormDelete
    Variables: array(
        'id' => $snippet->get('id'),
        'snippet' => &$snippet,
    );

Back to Top

core/model/modx/processors/element/snippet/update.php

    Event: OnBeforeSnipFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $snippet->get('id'),
        'snippet' => &$snippet,
    );

    Event: OnSnipFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $snippet->get('id'),
        'snippet' => &$snippet,
    );

Back to Top

core/model/modx/processors/element/tv/create.php

    Event: OnBeforeTVFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => 0,
        'tv' => &$tv,
    );

    Event: OnTVFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => $tv->get('id'),
        'tv' => &$tv,
    );

Back to Top

core/model/modx/processors/element/tv/renders/getinputproperties.php

    Event: OnTVInputPropertiesList
    Variables: array(
        'context' => $context,
    );

Back to Top

core/model/modx/processors/element/tv/renders/web/output/richtext.class.php

    Event: OnRichTextEditorInit
    Variables: array (
        'editor' => $richtexteditor,
        'elements' => $replace_richtext,
        'forfrontend' => 1,
        'width' => $w,
        'height' => $h
    );

Back to Top

core/model/modx/processors/element/tv/renders/getproperties.php

    Event: OnTVOutputRenderPropertiesList
    Variables: array(
        'context' => $context,
    );

Back to Top

core/model/modx/processors/element/tv/renders/getinputs.class.php

    Event: OnTVInputRenderList
    Variables: array(
        'context' => $context,
    );

Back to Top

core/model/modx/processors/element/tv/renders/getoutputs.class.php

    Event: OnTVOutputRenderList
    Variables: array(
        'context' => $context,
    );

Back to Top

core/model/modx/processors/element/tv/renders/getinputs.php

    Event: OnTVInputRenderList
    Variables: array(
        'context' => $context,
    );

Back to Top

core/model/modx/processors/element/tv/renders/getoutputs.php

    Event: OnTVOutputRenderList
    Variables: array(
        'context' => $context,
    );

Back to Top

core/model/modx/processors/element/tv/renders/getinputproperties.class.php

    Event: $this
    Variables: array(
        'context' => $this->getProperty('context'),
    );

Back to Top

core/model/modx/processors/element/tv/remove.php

    Event: OnBeforeTVFormDelete
    Variables: array(
        'id' => $tv->get('id'),
        'tv' => &$tv,
    );

    Event: OnTVFormDelete
    Variables: array(
        'id' => $tv->get('id'),
        'tv' => &$tv,
    );

Back to Top

core/model/modx/processors/element/tv/update.php

    Event: OnBeforeTVFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $tv->get('id'),
        'tv' => &$tv,
    );

    Event: OnTVFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $tv->get('id'),
        'tv' => &$tv,
    );

Back to Top

core/model/modx/processors/element/plugin/create.php

    Event: OnBeforePluginFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => 0,
        'plugin' => &$plugin,
    );

    Event: OnPluginFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => $plugin->get('id'),
        'plugin' => &$plugin,
    );

Back to Top

core/model/modx/processors/element/plugin/remove.php

    Event: OnBeforePluginFormDelete
    Variables: array(
        'id' => $plugin->get('id'),
        'plugin' => &$plugin,
    );

    Event: OnPluginFormDelete
    Variables: array(
        'id' => $plugin->get('id'),
        'plugin' => &$plugin,
    );

Back to Top

core/model/modx/processors/element/plugin/update.php

    Event: OnBeforePluginFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $plugin->get('id'),
        'plugin' => &$plugin,
    );

    Event: OnPluginFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $plugin->get('id'),
        'plugin' => &$plugin,
    );

Back to Top

core/model/modx/processors/source/duplicate.class.php

    Event: OnMediaSourceDuplicate
    Variables: array(
        'newResource' => &$this->newObject,
        'oldResource' => &$this->object,
        'newName' => $this->getProperty($this->nameField,''),
    );

Back to Top

core/model/modx/processors/resource/emptyrecyclebin.class.php

    Event: OnBeforeEmptyTrash
    Variables: array(
        'ids' => &$ids,
        'resources' => &$resources,
    );

    Event: OnEmptyTrash
    Variables: array(
        'num_deleted' => $count,
        'resources' => &$resources,
        'ids' => &$ids,
    );

Back to Top

core/model/modx/processors/resource/create.php

    Event: OnBeforeDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => 0,
        'resource' => &$resource,
        'reloadOnly' => !empty($scriptProperties['reloadOnly']),
    );

    Event: OnDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'reloadOnly' => !empty($scriptProperties['reloadOnly']),
    );

Back to Top

core/model/modx/processors/resource/delete.class.php

    Event: OnBeforeDocFormDelete
    Variables: array (
        'id' => $this->resource->get('id'),
        'resource' => &$this->resource,
        'children' => $childrenIds,
    );

    Event: OnDocFormDelete
    Variables: array (
        'id' => $this->resource->get('id'),
        'children' => $childrenIds,
        'resource' => &$this->resource,
    );

    Event: OnResourceDelete
    Variables: array(
        'id' => $this->resource->get('id'),
        'children' => &$childrenIds,
        'resource' => &$this->resource,
    );

Back to Top

core/model/modx/processors/resource/delete.php

    Event: OnBeforeDocFormDelete
    Variables: array (
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'children' => $childrenIds,
    );

    Event: OnDocFormDelete
    Variables: array (
        'id' => $resource->get('id'),
        'children' => $childrenIds,
        'resource' => &$resource,
    );

    Event: OnResourceDelete
    Variables: array(
        'id' => $resource->get('id'),
        'children' => &$childrenIds,
        'resource' => &$resource,
    );

Back to Top

core/model/modx/processors/resource/emptyrecyclebin.php

    Event: OnBeforeEmptyTrash
    Variables: array(
        'ids' => &$ids,
        'resources' => &$resources,
    );

    Event: OnEmptyTrash
    Variables: array(
        'num_deleted' => $count,
        'resources' => &$resources,
        'ids' => &$ids,
    );

Back to Top

core/model/modx/processors/resource/unpublish.class.php

    Event: OnDocUnPublished
    Variables: array(
        'docid' => $this->resource->get('id'),
        'id' => $this->resource->get('id'),
        'resource' => &$this->resource,
    );

Back to Top

core/model/modx/processors/resource/sort.php

    Event: OnResourceBeforeSort
    Variables: array(
        'nodes' => &$nodes,
    );

    Event: OnResourceSort
    Variables: array(
        'nodes' => &$nodes,
        'modifiedNodes' => &$modifiedNodes
    );

Back to Top

core/model/modx/processors/resource/sort.class.php

    Event: OnResourceBeforeSort
    Variables: array(
        'nodes' => &$this->nodes,
        'contexts' => &$this->contexts,
    );

    Event: OnResourceSort
    Variables: array(
        'nodes' => &$this->nodes,
        'nodesAffected' => &$this->nodesAffected,
        'contexts' => &$this->contexts,
        'contextsAffected' => &$this->contextsAffected,
        'modifiedNodes' => &$this->nodesAffected, /* backward compat */
    );

Back to Top

core/model/modx/processors/resource/create.class.php

    Event: OnBeforeDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => 0,
        'resource' => &$this->object,
        'reloadOnly' => $this->getProperty('reloadOnly',false),
    );

    Event: OnResourceAddToResourceGroup
    Variables: array(
        'mode' => 'resource-create',
        'resource' => &$this->object,
        'resourceGroup' => &$resourceGroup,
    );

    Event: OnResourceRemoveFromResourceGroup
    Variables: array(
        'mode' => 'resource-create',
        'resource' => &$this->object,
        'resourceGroup' => &$resourceGroup,
    );

    Event: OnDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => $this->object->get('id'),
        'resource' => &$this->object,
        'reloadOnly' => $this->getProperty('reloadOnly',false),
    );

Back to Top

core/model/modx/processors/resource/gettoolbar.php

    Event: OnResourceToolbarLoad
    Variables: array(
        'items' => &$items,
    );

Back to Top

core/model/modx/processors/resource/gettoolbar.class.php

    Event: OnResourceToolbarLoad
    Variables: array(
        'items' => &$items,
    );

Back to Top

core/model/modx/processors/resource/staticresource/create.php

    Event: OnBeforeDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => 0,
        'resource' => &$resource,
    );

    Event: OnDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'id' => $resource->get('id'),
        'resource' => & $resource
    );

Back to Top

core/model/modx/processors/resource/staticresource/update.php

    Event: OnBeforeDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $resource->get('id'),
        'resource' => &$resource,
    );

    Event: OnResourceUndelete
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
    );

    Event: OnResourceDelete
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
    );

    Event: OnDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $resource->get('id'),
        'resource' => & $resource
    );

Back to Top

core/model/modx/processors/resource/update.class.php

    Event: OnResourceAddToResourceGroup
    Variables: array(
        'mode' => 'resource-update',
        'resource' => &$this->object,
        'resourceGroup' => &$resourceGroup,
    );

    Event: OnResourceRemoveFromResourceGroup
    Variables: array(
        'mode' => 'resource-update',
        'resource' => &$this->object,
        'resourceGroup' => &$resourceGroup,
    );

    Event: OnResourceUndelete
    Variables: array(
        'id' => $this->object->get('id'),
        'resource' => &$this->object,
    );

    Event: OnResourceDelete
    Variables: array(
        'id' => $this->object->get('id'),
        'resource' => &$this->object,
    );

Back to Top

core/model/modx/processors/resource/undelete.php

    Event: OnResourceUndelete
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
    );

Back to Top

core/model/modx/processors/resource/publish.class.php

    Event: OnDocPublished
    Variables: array(
        'docid' => $this->resource->get('id'),
        'id' => $this->resource->get('id'),
        'resource' => &$this->resource,
    );

Back to Top

core/model/modx/processors/resource/update.php

    Event: OnBeforeDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $resource->get('id'),
        'resource' => &$resource,
    );

    Event: OnResourceUndelete
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
    );

    Event: OnResourceDelete
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
    );

    Event: OnDocFormSave
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'id' => $resource->get('id'),
        'resource' => & $resource
    );

Back to Top

core/model/modx/processors/resource/duplicate.class.php

    Event: OnResourceDuplicate
    Variables: array(
        'newResource' => &$this->newResource,
        'oldResource' => &$this->oldResource,
        'newName' => $this->getProperty('name',''),
        'duplicateChildren' => $this->getProperty('duplicate_children',false),
        'prefixDuplicate' => $this->getProperty('prefixDuplicate',false),
        'publishedMode' => $this->getProperty('published_mode','preserve'),
    );

Back to Top

core/model/modx/processors/resource/unpublish.php

    Event: OnDocUnPublished
    Variables: array(
        'docid' => $resource->get('id'),
        'id' => $resource->get('id'),
        'resource' => &$resource,
    );

Back to Top

core/model/modx/processors/resource/undelete.class.php

    Event: OnResourceUndelete
    Variables: array(
        'id' => $this->resource->get('id'),
        'resource' => &$this->resource,
    );

Back to Top

core/model/modx/processors/resource/publish.php

    Event: OnDocPublished
    Variables: array(
        'docid' => $resource->get('id'),
        'id' => $resource->get('id'),
        'resource' => &$resource,
    );

Back to Top

core/model/modx/processors/resource/duplicate.php

    Event: OnResourceDuplicate
    Variables: array(
        'newResource' => &$newResource,
        'oldResource' => &$oldResource,
    );

Back to Top

core/model/modx/modusergroup.class.php

    Event: OnUserGroupBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'usergroup' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnUserGroupSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'usergroup' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnUserGroupBeforeRemove
    Variables: array(
        'usergroup' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnUserGroupRemove
    Variables: array(
        'usergroup' => &$this,
        'ancestors' => $ancestors,
    );

Back to Top

core/model/modx/modparser.class.php

    Event: OnParseDocument
    Variables: array('content' => &$content));

    Event: OnElementNotFound
    Variables: array('class' => $class, 'name' => $realname));

Back to Top

core/model/modx/modmanagercontroller.class.php

    Event: OnBeforeManagerPageInit
    Variables: array(
        'action' => $this->config,
    );

    Event: OnManagerPageBeforeRender
    Variables: array('controller' => &$this));

    Event: OnManagerPageAfterRender
    Variables: array('controller' => &$this));

Back to Top

core/model/modx/modcontext.class.php

    Event: OnContextBeforeRemove
    Variables: array(
        'context' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnContextRemove
    Variables: array(
        'context' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnContextBeforeSave
    Variables: array(
        'context' => &$this,
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnContextSave
    Variables: array(
        'context' => &$this,
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'cacheFlag' => $cacheFlag,
    );

Back to Top

core/model/modx/modcategory.class.php

    Event: OnCategoryBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'category' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnCategorySave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'category' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnCategoryBeforeRemove
    Variables: array(
        'category' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnCategoryRemove
    Variables: array(
        'category' => &$this,
        'ancestors' => $ancestors,
    );

Back to Top

core/model/modx/modparser095.class.php

    Event: OnParseDocument
    Variables: None

Back to Top

core/model/modx/modcachemanager.class.php

    Event: OnCacheUpdate
    Variables: array(
        'results' => $results,
        'paths' => $providers,
        'options' => array_values($providers),
    );

    Event: OnResourceAutoPublish
    Variables: array(
        'results' => $publishingResults
    );

    Event: OnCacheUpdate
    Variables: array(
        'results' => $results,
        'paths' => $paths,
        'options' => $options,
    );

Back to Top

core/model/modx/modsnippet.class.php

    Event: OnSnippetBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'snippet' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnSnippetSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'snippet' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnSnippetBeforeRemove
    Variables: array(
        'snippet' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnSnippetRemove
    Variables: array(
        'snippet' => &$this,
        'ancestors' => $ancestors,
    );

Back to Top

core/model/modx/modmanagerrequest.class.php

    Event: OnHandleRequest
    Variables: None

    Event: OnManagerPageInit
    Variables: array('action' => $this->action));

Back to Top

core/model/modx/modmanagercontrollerdeprecated.class.php

    Event: OnBeforeManagerPageInit
    Variables: array(
        'action' => $this->config,
        'filename' => $f,
    );

Back to Top

core/model/modx/modpluginevent.class.php

    Event: OnPluginEventBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'pluginEvent' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnPluginEventSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'pluginEvent' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnPluginEventBeforeRemove
    Variables: array(
        'pluginEvent' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnPluginEventRemove
    Variables: array(
        'pluginEvent' => &$this,
        'ancestors' => $ancestors,
    );

Back to Top

core/model/modx/modrequest.class.php

    Event: OnHandleRequest
    Variables: None

    Event: OnWebPageInit
    Variables: None

    Event: OnLoadWebDocument
    Variables: None

    Event: OnLoadWebPageCache
    Variables: array(
        'resource' => &$resource,
    );

Back to Top

core/model/modx/modresponse.class.php

    Event: OnWebPagePrerender
    Variables: None

    Event: OnWebPagePrerender
    Variables: None

Back to Top

core/model/modx/modpropertyset.class.php

    Event: OnPropertySetBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'propertySet' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnPropertySetSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'propertySet' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnPropertySetBeforeRemove
    Variables: array(
        'propertySet' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnPropertySetRemove
    Variables: array(
        'propertySet' => &$this,
        'ancestors' => $ancestors,
    );

Back to Top

core/model/modx/modtemplatevar.class.php

    Event: OnTemplateVarBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'templateVar' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnTemplateVarSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'templateVar' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnTemplateVarBeforeRemove
    Variables: array(
        'templateVar' => &$this,
        'cacheFlag' => true,
    );

    Event: OnTemplateVarRemove
    Variables: array(
        'templateVar' => &$this,
        'cacheFlag' => true,
    );

    Event: $event
    Variables: array(
        'context' => $context,
    );

Back to Top

core/model/modx/sources/mods3mediasource.class.php

    Event: OnFileManagerUpload
    Variables: array(
        'files' => &$objects,
        'directory' => $container,
        'source' => &$this,
    );

Back to Top

core/model/modx/sources/modfilemediasource.class.php

    Event: OnFileManagerDirCreate
    Variables: array(
        'directory' => $newDirectoryPath,
        'source' => &$this,
    );

    Event: OnFileManagerDirRemove
    Variables: array(
        'directory' => $path,
        'source' => &$this,
    );

    Event: OnFileManagerDirRename
    Variables: array(
        'directory' => $newPath,
        'source' => &$this,
    );

    Event: OnFileManagerFileRename
    Variables: array(
        'path' => $newPath,
        'source' => &$this,
    );

    Event: OnFileManagerFileRemove
    Variables: array(
        'path' => $fullPath,
        'source' => &$this,
    );

    Event: OnFileManagerFileUpdate
    Variables: array(
        'path' => $fullPath,
        'source' => &$this,
    );

    Event: OnFileManagerFileCreate
    Variables: array(
        'path' => $fullPath,
        'source' => &$this,
    );

    Event: OnFileManagerBeforeUpload
    Variables: array(
        'files' => &$objects,
        'file' => &$file,
        'directory' => $container,
        'source' => &$this,
    );

    Event: OnFileManagerUpload
    Variables: array(
        'files' => &$objects,
        'directory' => $container,
        'source' => &$this,
    );

    Event: OnFileManagerMoveObject
    Variables: array(
        'from' => $fromObject->getPath(),
        'to' => $toObject->getPath(),
        'source' => &$this,
    );

Back to Top

core/model/modx/sources/modmediasource.class.php

    Event: OnMediaSourceGetProperties
    Variables: array(
        'properties' => $this->xpdo->toJSON($properties),
    );

Back to Top

core/model/modx/moduser.class.php

    Event: OnUserBeforeSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'user' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnUserSave
    Variables: array(
        'mode' => $isNew ? modSystemEvent::MODE_NEW : modSystemEvent::MODE_UPD,
        'user' => &$this,
        'cacheFlag' => $cacheFlag,
    );

    Event: OnUserBeforeRemove
    Variables: array(
        'user' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnUserRemove
    Variables: array(
        'user' => &$this,
        'ancestors' => $ancestors,
    );

    Event: OnUserChangePassword
    Variables: array (
        'user' => &$this,
        'newpassword' => $newPassword,
        'oldpassword' => $oldPassword,
        'userid' => $this->get('id'),/* deprecated */
        'username' => $this->get('username'),/* deprecated */
        'userpassword' => $newPassword,/* deprecated */
    );

Back to Top

core/model/modx/modx.class.php

    Event:
    Variables: OnMODXInit', array(
        'contextKey' => $contextKey,
        'options' => $options ) );

    Event: OnPageNotFound
    Variables: $options

    Event: OnPageUnauthorized
    Variables: $options

    Event: OnInitCulture
    Variables: None

    Event: OnBeforeSaveWebPageCache
    Variables: None

    Event: OnWebPageComplete
    Variables: None

Back to Top

manager/controllers/default/context/update.class.php

    Event: OnContextFormPrerender
    Variables: array(
        'key' => $this->context->get('key'),
        'context' => &$this->context,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnContextFormRender
    Variables: array(
        'key' => $this->context->get('key'),
        'context' => &$this->context,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/context/update.php

    Event: OnContextFormPrerender
    Variables: array(
        'key' => $context->get('key'),
        'context' => &$context,
        'mode' => 'upd',
    );

    Event: OnContextFormRender
    Variables: array(
        'key' => $context->get('key'),
        'context' => &$context,
        'mode' => 'upd',
    );

Back to Top

manager/controllers/default/system/file/edit.php

    Event: OnFileEditFormPrerender
    Variables: array(
        'file' => $filename,
        'mode' => modSystemEvent::MODE_UPD,
        'fa' => &$fa,
    );

Back to Top

manager/controllers/default/system/file/create.class.php

    Event: OnFileCreateFormPrerender
    Variables: array(
        'mode' => modSystemEvent::MODE_NEW,
        'directory' => $this->directory,
    );

Back to Top

manager/controllers/default/system/file/edit.class.php

    Event: OnFileEditFormPrerender
    Variables: array(
        'mode' => modSystemEvent::MODE_UPD,
        'file' => $this->filename,
        'fa' => &$this->fileRecord,
    );

Back to Top

manager/controllers/default/system/settings.class.php

    Event: OnSiteSettingsRender
    Variables: None

Back to Top

manager/controllers/default/system/settings/index.php

    Event: OnSiteSettingsRender
    Variables: None

Back to Top

manager/controllers/default/system/refresh_site.php

    Event: OnBeforeCacheUpdate
    Variables: None

    Event: OnSiteRefresh
    Variables: None

Back to Top

manager/controllers/default/security/user/create.php

    Event: OnUserFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnUserFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/security/user/create.class.php

    Event: OnUserFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnUserFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/security/user/update.class.php

    Event: OnUserFormPrerender
    Variables: array(
        'id' => $this->user->get('id'),
        'user' => &$this->user,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnUserFormRender
    Variables: array(
        'id' => $this->user->get('id'),
        'user' => &$this->user,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/security/user/update.php

    Event: OnUserFormPrerender
    Variables: array(
        'id' => $user->get('id'),
        'user' => &$user,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnUserFormRender
    Variables: array(
        'id' => $user->get('id'),
        'user' => &$user,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/security/login.class.php

    Event: OnManagerLoginFormPrerender
    Variables: None

    Event: OnManagerLoginFormRender
    Variables: None

Back to Top

manager/controllers/default/security/login.php

    Event: OnManagerLoginFormPrerender
    Variables: None

    Event: OnManagerLoginFormRender
    Variables: None

Back to Top

manager/controllers/default/browser/index.php

    Event: OnRichTextBrowserInit
    Variables: None

Back to Top

manager/controllers/default/browser/index.class.php

    Event: OnRichTextBrowserInit
    Variables: None

Back to Top

manager/controllers/default/element/template/create.php

    Event: OnTempFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnTempFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/element/template/create.class.php

    Event: OnTempFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnTempFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/element/template/update.class.php

    Event: OnTempFormPrerender
    Variables: array(
        'id' => $this->templateArray['id'],
        'template' => &$this->template,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnTempFormRender
    Variables: array(
        'id' => $this->templateArray['id'],
        'template' => &$this->template,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/element/template/update.php

    Event: OnTempFormRender
    Variables: array(
        'id' => $template->get('id'),
        'template' => &$template,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnTempFormPrerender
    Variables: array(
        'id' => $template->get('id'),
        'template' => &$template,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/element/chunk/create.php

    Event: OnChunkFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
        'chunk' => null,
    );

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $which_editor,
        'elements' => array('post'),
    );

    Event: OnChunkFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
        'chunk' => null,
    );

Back to Top

manager/controllers/default/element/chunk/create.class.php

    Event: OnRichTextEditorInit
    Variables: array(
        'elements' => array('post'),
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnChunkFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
        'chunk' => null,
    );

    Event: OnChunkFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
        'chunk' => null,
    );

Back to Top

manager/controllers/default/element/chunk/update.class.php

    Event: OnChunkFormPrerender
    Variables: array(
        'id' => $this->chunk->get('id'),
        'mode' => modSystemEvent::MODE_UPD,
        'chunk' => $this->chunk,
    );

    Event: OnRichTextEditorInit
    Variables: array(
        'elements' => array('post'),
        'chunk' => &$this->chunk,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnChunkFormRender
    Variables: array(
        'id' => $this->chunk->get('id'),
        'mode' => modSystemEvent::MODE_UPD,
        'chunk' => $this->chunk,
    );

Back to Top

manager/controllers/default/element/chunk/update.php

    Event: OnChunkFormRender
    Variables: array(
        'id' => $_REQUEST['id'],
        'chunk' => &$chunk,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $which_editor,
        'elements' => array('post'),
        'chunk' => &$chunk,
    );

    Event: OnChunkFormPrerender
    Variables: array(
        'id' => $chunk->get('id'),
        'chunk' => &$chunk,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/element/snippet/create.php

    Event: OnSnipFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnSnipFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/element/snippet/create.class.php

    Event: OnSnipFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnSnipFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/element/snippet/update.class.php

    Event: OnSnipFormPrerender
    Variables: array(
        'id' => $this->snippetArray['id'],
        'snippet' => &$this->snippet,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnSnipFormRender
    Variables: array(
        'id' => $this->snippetArray['id'],
        'snippet' => &$this->snippet,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/element/snippet/update.php

    Event: OnSnipFormRender
    Variables: array(
        'id' => $snippet->get('id'),
        'snippet' => &$snippet,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnSnipFormPrerender
    Variables: array(
        'id' => $snippet->get('id'),
        'snippet' => &$snippet,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/element/tv/create.php

    Event: OnTVFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnTVFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/element/tv/create.class.php

    Event: OnTVFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnTVFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/element/tv/update.class.php

    Event: OnTVFormPrerender
    Variables: array(
        'id' => $this->tvArray['id'],
        'tv' => &$this->tv,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnTVFormRender
    Variables: array(
        'id' => $this->tvArray['id'],
        'tv' => &$this->tv,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/element/tv/update.php

    Event: OnTVFormRender
    Variables: array(
        'id' => $tv->get('id'),
        'tv' => &$tv,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnTVFormPrerender
    Variables: array(
        'id' => $tv->get('id'),
        'tv' => &$tv,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/element/plugin/create.php

    Event: OnPluginFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnPluginFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/element/plugin/create.class.php

    Event: OnPluginFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnPluginFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/element/plugin/update.class.php

    Event: OnPluginFormPrerender
    Variables: array(
        'id' => $this->pluginArray['id'],
        'plugin' => &$this->plugin,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnPluginFormRender
    Variables: array(
        'id' => $this->pluginArray['id'],
        'plugin' => &$this->plugin,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/element/plugin/update.php

    Event: OnPluginFormRender
    Variables: array(
        'id' => $plugin->get('id'),
        'plugin' => &$plugin,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnPluginFormPrerender
    Variables: array(
        'id' => $plugin->get('id'),
        'plugin' => &$plugin,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/resource/create.php

    Event: OnDocFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnDocFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnRichTextEditorRegister
    Variables: None

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $rte,
        'elements' => $replace_richtexteditor,
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/resource/symlink/create.php

    Event: OnDocFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnDocFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnRichTextEditorRegister
    Variables: None

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $rte,
        'elements' => $replace_richtexteditor,
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/resource/symlink/update.php

    Event: OnDocFormPrerender
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnDocFormRender
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnRichTextEditorRegister
    Variables: None

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $rte,
        'elements' => $replace_richtexteditor,
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/resource/tvs.php

    Event: OnResourceTVFormPrerender
    Variables: array(
        'resource' => $resourceId,
    );

    Event: OnResourceTVFormRender
    Variables: array(
        'categories' => &$finalCategories,
        'template' => $templateId,
        'resource' => $resourceId,
        'tvCounts' => &$tvCounts,
    );

Back to Top

manager/controllers/default/resource/weblink/create.php

    Event: OnDocFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnDocFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnRichTextEditorRegister
    Variables: None

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $rte,
        'elements' => $replace_richtexteditor,
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/resource/weblink/update.php

    Event: OnDocFormPrerender
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnDocFormRender
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnRichTextEditorRegister
    Variables: None

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $rte,
        'elements' => $replace_richtexteditor,
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/resource/staticresource/create.php

    Event: OnDocFormPrerender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnDocFormRender
    Variables: array(
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

    Event: OnRichTextEditorRegister
    Variables: None

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $rte,
        'elements' => $replace_richtexteditor,
        'id' => 0,
        'mode' => modSystemEvent::MODE_NEW,
    );

Back to Top

manager/controllers/default/resource/staticresource/update.php

    Event: OnDocFormPrerender
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnDocFormRender
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnRichTextEditorRegister
    Variables: None

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $rte,
        'elements' => $replace_richtexteditor,
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

manager/controllers/default/resource/resource.class.php

    Event: OnDocFormPrerender
    Variables: $properties

    Event: OnDocFormRender
    Variables: array(
        'id' => $resourceId,
        'resource' => &$this->resource,
        'mode' => !empty($resourceId) ? modSystemEvent::MODE_UPD : modSystemEvent::MODE_NEW,
    );

    Event: OnRichTextEditorRegister
    Variables: None

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $rte,
        'elements' => $this->rteFields,
        'id' => $resourceId,
        'resource' => &$this->resource,
        'mode' => !empty($resourceId) ? modSystemEvent::MODE_UPD : modSystemEvent::MODE_NEW,
    );

    Event: OnResourceTVFormRender
    Variables: array(
        'categories' => &$finalCategories,
        'template' => $templateId,
        'resource' => $this->resource->get('id'),
        'tvCounts' => &$this->tvCounts,
        'hidden' => &$hidden,
    );

    Event: OnResourceTVFormPrerender
    Variables: array(
        'resource' => $this->resource->get('id'),
    );

Back to Top

manager/controllers/default/resource/update.php

    Event: OnDocFormPrerender
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnDocFormRender
    Variables: array(
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

    Event: OnRichTextEditorRegister
    Variables: None

    Event: OnRichTextEditorInit
    Variables: array(
        'editor' => $rte,
        'elements' => $replace_richtexteditor,
        'id' => $resource->get('id'),
        'resource' => &$resource,
        'mode' => modSystemEvent::MODE_UPD,
    );

Back to Top

 

My book, MODX: The Official Guide - Digital Edition is now available here. The paper version of the book is available from Amazon.

If you have the book and would like to download the code, you can find it here.

If you have the book and would like to see the updates and corrections page, you can find it here.

MODX: The Official Guide is 772 pages long and goes far beyond this web site in explaining beginning and advanced MODX techniques. It includes detailed information on:

  • Installing MODX
  • How MODX Works
  • Working with MODX resources and Elements
  • Using Git with MODX
  • Using common MODX add-on components like SPForm, Login, getResources, and FormIt
  • MODX security Permissions
  • Customizing the MODX Manager
  • Using Form Customization
  • Creating Transport Packages
  • MODX and xPDO object methods
  • MODX System Events
  • Using PHP with MODX

Go here for more information about the book.

Thank you for visiting BobsGuides.com

  —  Bob Ray