Actions

Plugin events: Difference between revisions

From LimeSurvey Manual

m (→‎Global Events: Removed version information for unsupported versions)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
At version 2.50 build 160425 the following events are available for plugins to subscribe to:
As of version 5 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 ==
== Global Events ==
Line 41: Line 39:
*[[beforeToolsMenuRender]]
*[[beforeToolsMenuRender]]
*[[beforeUrlCheck]]
*[[beforeUrlCheck]]
*[[beforeWelcomePageRender]]
*[[createNewUser]]
*[[createNewUser]]
*[[createRandomPassword]]
*[[createRandomPassword]]
Line 64: Line 63:
This events needs to be called with php cli command.
This events needs to be called with php cli command.


*[[cron (command)|cron]]{{NewIn|v=2.05|b=140404}}
*[[cron (command)|cron]]
*[[direct (command)|direct]]{{NewIn|v=2.63.0|b=170304}}
*[[direct (command)|direct]]


== Authentification related events ==
== Authentification related events ==

Latest revision as of 12:17, 23 February 2024

As of version 5 the following events are available for plugins to subscribe to:

Global Events

CLI Events

This events needs to be called with php cli command.

Authentification related events


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

Available model in application/models/.

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');