Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
6694 Weergaven

I recently needed to execute a function on module installation.

My research has brought up two different ways:

  1. Using the _init() function of a class
  2. Using the data.xml file (noupdate="1") to call a function of a model

Which one is recommended? What are the differences? Is it version dependend?

Thanks!

Avatar
Annuleer
Beste antwoord

Hi,

The noupdate parameter is used to indicate if the values in the xml file must be re-imported when a module in updated. noupdate="1", if we delete a data record and update the custom module, the deleted data not will be imported again._init() function is used assign values to the data members of the class when an object of class is created. The better option for your question is _init() function.

Regards

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
dec. 24
6622
1
jul. 16
3701
1
aug. 15
9620
0
mrt. 15
4600
0
mrt. 15
4380