modules/UpgradeWizard/UpgradeRemoval.php
\UpgradeRemoval
UpgradeRemoval.php
This is the base class to support removing files during an upgrade process. To support custom removal of files during an upgrade process take the following steps:
1) Extend this class and save the PHP file name to be the same as the class name 2) Override the getFilesToRemove method to return an Array of files/directories to remove 3) Place this PHP file in custom/scripts/files_to_remove directory of your SugarCRM install
The UpgradeRemoval instance will be invoked from the unlinkUpgradeFiles method of uw_utils.php
Methods
backup(
\$file $file
)
:
void
backup Private method to handle backing up the file to custom/backup directory
Name | Type | Description |
---|---|---|
$file | \$file | File or directory to backup to custom/backup directory |
getFilesToRemove(
int $version
)
:
mixed
getFilesToRemove Return array of files/directories to remove. Default implementation returns empty array.
Name | Type | Description |
---|---|---|
$version | int | integer value of original version to be upgraded |
Type | Description |
---|---|
mixed | $files Array of files/directories to remove |