\AssetCommitterFileExtension
Class AssetCommitterFileExtension
Synopsis
class AssetCommitterFileExtension
extends Extension
{
- // members
- private array $method_calls = ;
- // methods
- public void onAfterUpload()
- public void onAfterDelete()
- public void updateLinks()
- private bool isFolder()
- private AssetCommitterInterface committer()
- private bool isRepetitiveCall()
Hierarchy
Extends
- Extension
Tasks
Line | Task |
---|---|
23 | See if SilverStripe 4 provides an indication whether the file was overridden. |
Members
private
- $method_calls
Methods
private
- committer()
- isFolder() — Helps to prevent doing any commits on folders, as this module is currently only designed for single file commits only. If a folder gets renamed, it should trigger separate commits for each file in it (for now). Same for deletion.
- isRepetitiveCall() — Sometimes SilverStripe calls hook methods multiple times in a row for an unknown reason. This method is a hack that tries to detect if a method call is redundant.
public
- onAfterDelete() — Commits a file deletion.
- onAfterUpload() — Commits a new file.
- updateLinks() — Commits a renamed/moved file.