Actions

Difference between revisions of "Plugin events"

From LimeSurvey Manual

m (Text replacement - "ExpressionManager" to "ExpressionScript Engine")
(Specific Model events: Add models list link)
Line 88: Line 88:
 
* afterSurveyDelete
 
* afterSurveyDelete
 
* afterSurveySave
 
* afterSurveySave
 +
 +
[https://github.com/LimeSurvey/LimeSurvey/tree/master/application/models Available model in application/models/.]
  
 
=== [[Dynamic model events]]{{NewIn|v=3.15.1}}===
 
=== [[Dynamic model events]]{{NewIn|v=3.15.1}}===

Revision as of 10:33, 24 February 2020

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

CLI Events

This events needs to be called with php cli command.

  • cron (New in 2.05 build 140404)
  • direct (New in 2.63.0 build 170304)

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