Actions

Plugin events: Difference between revisions

From LimeSurvey Manual

Line 5: Line 5:
== Global Events ==
== Global Events ==


*[[Authentication plugin development#afterLoginFormSubmit|afterLoginFormSubmit]]
*[[Authentication plugin development#afterLogout|afterLogout]]
*[[afterFailedLoginAttempt]]
*[[afterFindSurvey]]
*[[afterFindSurvey]]
*[[afterPluginLoad]]
*[[afterPluginLoad]]
Line 68: Line 65:
*[[newSurveySettings]]
*[[newSurveySettings]]
*[[newUnsecureRequest|NewUnsecureRequest]]
*[[newUnsecureRequest|NewUnsecureRequest]]
*[[onSurveyDenied]]{{NewIn|v=3.0.0}}
*[[beforeUrlCheck]]{{NewIn|v=3.12.2}}
== Authentification related events ==
*[[Authentication plugin development#remoteControlLogin|remoteControlLogin]]
*[[Authentication plugin development#afterLoginFormSubmit|afterLoginFormSubmit]]
*[[Authentication plugin development#afterLogout|afterLogout]]
*[[afterFailedLoginAttempt]]
*[[newUserSession]]
*[[newUserSession]]
*[[newUserLogin]]
*[[newUserLogin]]
*[[onSurveyDenied]]{{NewIn|v=3.0.0}}
*[[beforeUrlCheck]]{{NewIn|v=3.12.2}}


== Model Events ==
== Model Events ==

Revision as of 10:41, 25 May 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

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

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