modules/UpgradeWizard/UpgradeRemoval.php

Show: inherited
Table of Contents

\UpgradeRemoval

Package: SugarCRM

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

methodprotectedbackup( \$file $file ) : void

backup Private method to handle backing up the file to custom/backup directory

Parameters
Name Type Description
$file \$file

File or directory to backup to custom/backup directory

methodpublicgetFilesToRemove( int $version ) : mixed

getFilesToRemove Return array of files/directories to remove. Default implementation returns empty array.

Parameters
Name Type Description
$version int

integer value of original version to be upgraded

Returns
Type Description
mixed $files Array of files/directories to remove
methodpublicprocessFilesToRemove( mixed $files = array() ) : void

processFilesToRemove This method handles removing the array of files/directories specified.

Parameters
Name Type Description
$files mixed
Documentation was generated by DocBlox 0.18.1.