Plugin events: Difference between revisions
From LimeSurvey Manual
DenisChenu (talk | contribs) (→CLI Events: separation) |
DenisChenu (talk | contribs) (→CLI Events: Fix link) |
||
Line 59: | Line 59: | ||
This events needs to be called with php cli command. | This events needs to be called with php cli command. | ||
*[[cron]]{{NewIn|v=2.05|b=140404}} | *[[cron (command)|cron]]{{NewIn|v=2.05|b=140404}} | ||
*[[direct]]{{NewIn|v=2.63.0|b=170304}} | *[[direct (command)|direct]]{{NewIn|v=2.63.0|b=170304}} | ||
== Authentification related events == | == Authentification related events == |
Revision as of 18:59, 2 July 2019
At version 2.50 build 160425 the following events are available for plugins to subscribe to:
NB: Version 2.60.0 is not the same as version 2.6, which is the new number for version 2.06. 2.60.0 comes after 2.59.1.
Global Events
- afterFindSurvey
- afterPluginLoad
- afterQuickMenuLoad
- afterSurveyActivate
- afterSurveyComplete
- afterSurveyDeactivate
- afterSurveyQuestionAssessment (New in 2.62 build 170207)
- afterSurveyQuota (New in 2.05 build 141006)
- afterSurveySettingsSave
- beforeActivate
- beforeAdminMenuRender
- beforeEmail (New in 4.0.0 )
- beforeCloseHtml (New in 2.60.0 )
- beforeControllerAction (New in 2.50 build 160425)
- beforeDeactivate
- beforeHasPermission (New in 2.06 )
- beforeLoadResponse
- beforePermissionSetSave
- beforePluginManagerMenuRender (New in 4.0.0 )
- beforeQuestionRender (New in 2.05 build 140922)
- beforeRegister (New in 2.06 )
- beforeRegisterForm (New in 2.06 )
- beforeSideMenuRender (New in 2.51.0 )
- beforeSurveyAdminView
- beforeSurveyActivate (New in 3.15 build 181017)
- beforeSurveyBarRender (New in 3.15 build 181017)
- beforeSurveyDeactivate (New in 2.5 )
- beforeSurveyEmail (New in 4.0.0 )
- beforeSurveyPage (New in 2.05 build 140109)
- beforeSurveySettings
- beforeSurveysStartpageRender (Deprectaed from 3.0.0 )
- beforeTokenEmail (New in 2.05 build 140404)
- beforeToolsMenuRender
- createNewUser
- createRandomPassword (New in 4.0.0 build 190523)
- checkPasswordRequirement (New in 4.0.0 build 190523)
- ExpressionManagerStart WIP (New in 4.0.0-dev )
- getGlobalBasePermissions] (New in 3.0.0 )
- getPluginTwigPath (New in 3.10.0 )
- listExportOptions
- listExportPlugins
- listQuestionPlugins
- newDirectRequest
- newExport
- newQuestionAttributes (New in 2.50 build 160731)
- newSurveySettings
- NewUnsecureRequest
- onSurveyDenied (New in 3.0.0 )
- beforeUrlCheck (New in 3.12.2 )
CLI Events
This events needs to be called with php cli command.
- newLoginForm
- afterLoginFormSubmit
- afterSuccessfulLogin
- newUserLogin
- newUserSession
- afterLogout
- afterFailedLoginAttempt
- remoteControlLogin
Model Events
All models (Survey, Question, etc.) support a series of before & after events.
Specific Model events
These include model-specific events (example for Survey model):
- beforeSurveyDelete
- beforeSurveySave
- afterSurveyDelete
- afterSurveySave
Dynamic model events (New in 3.15.1 )
- beforeTokenDelete
- beforeTokenSave
- afterTokenDelete
- afterTokenSave
- beforeResponseDelete
- beforeResponseSave
- afterResponseDelete
- afterResponseSave
- beforeTokenDynamicDelete
- beforeTokenDynamicSave
- afterTokenDynamicDelete
- afterTokenDynamicSave
- beforeSurveyDynamicDelete
- beforeSurveyDynamicSave
- afterSurveyDynamicDelete
- afterSurveyDynamicSave
Generic events
As well as generic events independent of the model's name:
In all of the above events, the associated model object is available as part of event data:
$model = $this->event->get('model');