\CreatorLastEditorExtension
Synopsis
class CreatorLastEditorExtension
extends DataExtension
{
- // members
- private static array $has_one = ;
- // methods
- public void onBeforeWrite()
- public void updateCMSFields()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Members
private
- $has_one — array
Methods
public
- onBeforeWrite() — 1) Save the creator as the current editing member if there is not creator already assigned 2) Save the last editor (e.g. an admin) as the person who last edited this document
- updateCMSFields() — Allow the admin to override the creator and last editor