简体   繁体   中英

Need help to make audit trail using ATK Framework

I don't have any experience using ATK, If some one could help to giving me the tutorial page to make the Audit trail using ATK framework. Thank you.

check out the atkEventLog class. you would use it like this :

$this->addListener(atknew("atk.utils.atkeventlog"));

where $this is your node that you want an audit log for. it requires a table called atkeventlog , but i can't remember if that is created by default or not... anyway, check atk/utils/class.atkeventlog.inc for structure if needed. i doubt this will do all of your revision history. i seem to remember it being more of an access history. you might see user1 changed record 2 in SuperSecureArea or something like that, but i don't think it will record field level changes.

for that you need to implement some of your own stuff, probably center around the NF_TRACK_CHANGES node flag. this will pass the old values to postUpdate as $rec[atkorgrec] . if i think about it i might post an implementation of this that i did a while back.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM