Actions

Plugin events: Difference between revisions

From LimeSurvey Manual

No edit summary
No edit summary
Line 44: Line 44:
[[Category:Development]]
[[Category:Development]]
[[Category:Plugins]]
[[Category:Plugins]]
== Model Events ==
All models (Survey, Question, etc.) support a series of before & after events.
These include model-specific events (example for Survey model):
* [[beforeSurveyDelete]]
* [[beforeSurveySave]]
* [[afterSurveyDelete]]
* [[afterSurveySave]]
As well as generic events independent of the model's name:
* [[beforeModelDelete]]
* [[beforeModelSave]]
* [[afterModelDelete]]
* [[afterModelSave]]
In all of the above events, the associated model object is available as part of event data:
<code>$model = $this->event->get('model');</code>

Revision as of 02:31, 16 September 2016

At version 2.50 build 160425 the following events are available for plugins to subscribe to:

Model Events

All models (Survey, Question, etc.) support a series of before & after events.

These include model-specific events (example for Survey model):

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