modules/UpgradeWizard/upgradeMetaHelper.php
\UpgradeMetaHelper
Properties
Methods
UpgradeMetaHelper(
\$dir $dir
=
'upgrade', \$masterCopyDirectory $masterCopyDirecotry
=
'modules_50', \$debugMode $debugMode
=
false
)
:
void
UpgradeMetaHelper This is the constructor for the UpgradeMetaHelper class
Name | Type | Description |
---|---|---|
$dir | \$dir | The root upgrade directory (where to copy working files) |
$masterCopyDirecotry | \$masterCopyDirectory | The root master directory (where SugarCRM 5.x files reside) |
$debugMode | \$debugMode | Debug mode, default is false |
create_upgrade_directory(
)
:
void
create_upgrade_directory Creates a directory called upgrade to house all the modules that are studio enabled.
Also creates subdirectories for all studio enabled modules.
getAllCustomizedModules(
)
:
void
Get all the customized modules. Compare the file md5s with the base md5s If a file has been modified then put the module in the list of customized modules. Show the list in the preflight check UI.
getModifiedModules(
)
:
\$return_array
getModifiedModules This method returns a two-dimensional Array of Studio enabled modules that have been modified. The second Array index is an Array of files that do not match the md5 checksum for the module
Type | Description |
---|---|
\$return_array | Two-dimensional Array of [module][modified file(s) Array] |
loadStudioModules(
)
:
\$modules
loadStudioModules This method returns an Array of all modules where a studio.php file is present in the metadata directory of the module
Type | Description |
---|---|
\$modules | Array of modules that are studio enabled |
parseFile(
\$module_name $module_name, \$files $files
)
:
void
parseFile Hanldes parsing the files for given module where Studio or manual changes have been detected.
Name | Type | Description |
---|---|---|
$module_name | \$module_name | The module to parse |
$files | \$files | Array of files found to parse |
runParser(
)
:
void
runParser This method creates the EditView and DetailView parser intances and runs the parsing for the modules to upgrade
saveMatchingFilesQueries(
$currStep, $value
)
:
void
Name | Type | Description |
---|---|---|
$currStep | ||
$value |
verifyMetaData(
\$metadataFile $metadataFile, \$module $module, \$view $view
)
:
boolean
verifyMetaData This function does some quick checks to make sure the metadataFile at least has an Array panel
Name | Type | Description |
---|---|---|
$metadataFile | \$metadataFile | The path to the metadata file to verify |
$module | \$module | The module to verify |
$view | \$view | The view (EditView or DetailView) |
Type | Description |
---|---|
boolean | true if verification check is okay; false otherwise |