Package DE_EPAGES::Object::API::ObjectInstaller
Install/patch/uninstall objects, classes and attributes. Processes Database/XML/Attributes*.xml files.
Base |
DE_EPAGES::Cartridge::API::CartridgeInstaller |
Functions
- getAttributeID
- getClassID
- importPatchDir
- install
- onPatchCompleteDeleteTranslationFiles
- onPatchCompleteImportTranslationFiles
- onPatchDeleteObjects
- onPatchDeleteStandards
- onPatchImportObjects
- onPatchImportStandards
- patchLanguages
- uninstall
getAttributeID
Returns the attribute id of a direct attribute, i.e. without consideration of the class hierarchy. This is useful for the patch process inside the patchDBStructure() method where it's not safe to use other API functions. Throws the error NoAttributeName if the requested attribute does not exist.
Syntax |
$AttributeID = $Installer->getAttributeID($ClassAlias, $AttributeAlias); |
Example |
$AttributeID = $Installer->getAttributeID('System', 'TaxMatrix'); |
Input |
|
Return |
|
getClassID
Returns the class id of a class using direct SQL. This is useful for the patch process inside the patchDBStructure() method where it's not safe to use other API functions. Throws the error NoClassName if the requested class does not exist.
Syntax |
$ClassID = $Installer->getClassID($ClassAlias); |
Example |
$ClassID = $Installer->getClassID('System'); |
Input |
|
Return |
|
importPatchDir
Processes the file patch.xml in the directory Patches/$PatchSubDir if it exists.
Syntax |
$NewVersion = $Installer->importPatchDir($PatchSubDir, $PatchSection); |
Example |
$NewVersion = $self->importPatchDir('Patch_6_9_0', 'Patch'); |
Input |
|
Return |
|
install
Installs Database/XML/Attributes*.xml and Database/XML/Translation.Attributes.*.xml on installation process.
Syntax |
$Installer->install; |
onPatchCompleteDeleteTranslationFiles
Deletes all translation attributes from del_Translation files in specific patch folder, the name is generated from $PatchSubDir and Cartidge folder.
Syntax |
$Installer->onPatchCompleteDeleteTranslationFiles($PatchSubDir); |
Example |
$self->onPatchCompleteDeleteTranslationFiles('Patch_6_9_0', 'Patch'); |
Input |
|
onPatchCompleteImportTranslationFiles
Deletes all translation attributes from del_Translation files in specific patch folder, the name is generated from $PatchSubDir and Cartidge folder.
Syntax |
$Installer->onPatchCompleteImportTranslationFiles($PatchSubDir); |
Example |
$self->onPatchCompleteImportTranslationFiles('Patch_6_10_2'); |
Input |
|
onPatchDeleteObjects
Called by PatchImportHandler by Method onPatchDeleteObjects. Deletes the objects at file $File.
Syntax |
$Installer->onPatchDeleteObjects($File, $hParams); |
Example |
$Installer->onPatchDeleteObjects( 'Database/XML/FormsShop.xml', {'CVS' => 'Removed', }); |
Input |
|
onPatchDeleteStandards
Called by PatchDeleteHandler by Method onPatchDeleteStandards Deletes the standards at file $File.
Syntax |
$Installer->onPatchDeleteStandards($File, $hParams); |
Example |
$Installer->onPatchDeleteStandards( 'Database/XML/Languages.xml', {'CVS' => 'Changed', }); |
Input |
|
onPatchImportObjects
Called by PatchImportHandler by method onPatchImportObjects Imports the objects in file $File.
Syntax |
$Installer->onPatchImportObjects($File, $hParams); |
Example |
$Installer->onPatchImportObjects( 'Database/XML/AttributesShop.xml', {'CVS' => 'Changed', }); |
Input |
|
onPatchImportStandards
Called by PatchImportHandler by method onPatchImportStandards Imports the standards in file $File.
Syntax |
$Installer->onPatchImportStandards($File, $hParams); |
Example |
$Installer->onPatchImportStandards( 'Database/XML/Languages.xml', {'CVS' => 'Changed', }); |
Input |
|
patchLanguages
Processes the files patch.xx.xml via xml import (DE_EPAGES::XML::API::XMLInstaller::importPatch), where xx are the language codes of all active languages (where IsUsed=1).
Syntax |
$Installer->patchLanguages($PatchSubDir, $PatchSection); |
Example |
$self->patchLanguages('Patch_6_9_1', 'Patch'); |
Input |
|
uninstall
Uninstalls Database/XML/Attributes*.xml on uninstallation process.
Syntax |
$Installer->uninstall; |