CopyFilesOnItemClone uses Singleton
When copying entities, it becomes necessary, in custom fields of the file type, not only to copy the file ID, but also the file itself, so that deletion from the new entity does not affect the old one.
This class provides functionality to manage the lifecycle of this process.
Table of Contents
Constants
- CLEAN_FILE_QUEUE_KEY = 'clean_copy_file'
Methods
- __construct() : mixed
- __wakeup() : mixed
- execute() : void
- getInstance() : static
- removeFileFromNotUsedCleanQueue() : void
- Remove file from cleanup queue.
Constants
CLEAN_FILE_QUEUE_KEY
public
mixed
CLEAN_FILE_QUEUE_KEY
= 'clean_copy_file'
Methods
__construct()
public
__construct() : mixed
__wakeup()
public
__wakeup() : mixed
execute()
public
execute(Item &$item, Factory $factory) : void
Parameters
- $item : Item
- $factory : Factory
getInstance()
public
static getInstance() : static
Return values
staticremoveFileFromNotUsedCleanQueue()
Remove file from cleanup queue.
public
static removeFileFromNotUsedCleanQueue(int $fileId) : void
Parameters
- $fileId : int