Download the PHP package philippgrashoff/auditforatk without Composer
On this page you can find all versions of the php package philippgrashoff/auditforatk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package auditforatk
auditforatk
This is an extension for atk4/data. It is used to create a human-readable audit of changes made to models and other actions. It is NOT meant to add the ability to undo changes.
How the final audit looks like is up to you - you can implement the rendering yourself. A sample audit of a Country
model could look like:
In this example, the last entry is not about a field change, but audits a custom action.
Contents
Audit
: This class saves all data for an audit entry. For performant reading/displaying, onlycreated_date
,user_name
andrendered_message
fields are needed. However, each audit object also stores all information to re-render an audit message, e.g. if the desired output format was changed, the title of a hasOne relation was updated or for translation.AuditTrait
: This Trait is added to any Model which should be audited. It sets the necessary hooks to create audits on creation, any field change and on deletion. Fields can be excluded from audit for each model.AuditController
: Contains all logic how an Audit should be created. If you want other Audits than mere field audits, you need to extend this class to fit your purposes.MessageRenderer
: Highly coupled withAuditController
. It takes care of rendering a human-readable message for each Audit. You can extend this class to have a different output format, e.g. have rendered HTML in the rendered message. The result is saved inAudit
rendered_message
field.
All versions of auditforatk with dependencies
PHP Build Version
Package Version
Requires
php Version
8.*
atk4/data Version 5.*
philippgrashoff/secondarymodelforatk Version 5.*
philippgrashoff/atkdatamodeltraits Version 5.*
atk4/data Version 5.*
philippgrashoff/secondarymodelforatk Version 5.*
philippgrashoff/atkdatamodeltraits Version 5.*
The package philippgrashoff/auditforatk contains the following files
Loading the files please wait ....