Actions

BeforeModelSave: Difference between revisions

From LimeSurvey Manual

(Created page with "'''When''' When a single database model was saved using model->save(). See [https://www.yiiframework.com/doc/api/1.1/CActiveRecord#onBeforeSave-detail CActiveRecord::onBefore...")
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''When'''
'''When'''


When a single database model was saved using model->save(). See [https://www.yiiframework.com/doc/api/1.1/CActiveRecord#onBeforeSave-detail CActiveRecord::onBeforeSave].
Before a single database model was saved using model->save(). See [https://www.yiiframework.com/doc/api/1.1/CActiveRecord#onBeforeSave-detail CActiveRecord::onBeforeSave].


'''Input'''
'''Input'''


*''model'' : The current model as an [https://www.yiiframework.com/doc/api/1.1/CActiveRecord ActiveRecord]
*''model'' : The current model as an [https://www.yiiframework.com/doc/api/1.1/CActiveRecord ActiveRecord]
*''surveyId'' : related survey id if exist
*''iSurveyID'' : related survey id if exist
*''dynamicId'' : related dynamic id if exist (for Token and Response)


'''Possible output'''
'''Possible output'''


None.
None.
You can update current model before it was saved.
'''Warning'''
Not all LimeSurvey action use ActiveRecord to save a model.


[[Category:Plugins events]]
[[Category:Plugins events]]

Latest revision as of 09:14, 15 November 2018

When

Before a single database model was saved using model->save(). See CActiveRecord::onBeforeSave.

Input

  • model : The current model as an ActiveRecord
  • surveyId : related survey id if exist
  • iSurveyID : related survey id if exist
  • dynamicId : related dynamic id if exist (for Token and Response)

Possible output

None.

You can update current model before it was saved.

Warning

Not all LimeSurvey action use ActiveRecord to save a model.