contenido\classes\class.versionImport.php
Description: Super class for revision
Requirements:
- Author
- Bilal Arslan, Timo Trautmann
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- http://www.contenido.org
- Package
- Contenido Backend classes
- Since
- file available since contenido release >= 4.8.8 {@internal created 2008-08-12 }}
- Version
- 1.0.0
\VersionImport
- Parent(s)
- \Version
Properties

$iDisplayNotification- Type
- n/a
- Inherited_from
- \Version::$$iDisplayNotification
Methods

CreateHistoryVersion() : voidCreats xml files from table mod_history if exists any rows.
After create a version it will be delete the current row. If no rows any available, it will be drop the table mod_history.

__construct(array $aCfg, array $aCfgClient, object $oDB, integer $iClient, object $sArea, object $iFrame) : voidThe class versionImport object constructor, initializes class variables
| Name | Type | Description |
|---|---|---|
| $aCfg | array | |
| $aCfgClient | array | |
| $oDB | object | |
| $iClient | integer | |
| $sArea | object | |
| $iFrame | object |

buildSelectBox(string $sTableForm, string $sAddHeader, string $sLabelOfSelectBox, string $sIdOfSelectBox) : void| Name | Type | Description |
|---|---|---|
| $sTableForm | string | The name of Table_Form class |
| $sAddHeader | string | The Header Label of SelectBox Widget |
| $sLabelOfSelectBox | string | The Label of SelectBox Widget |
| $sIdOfSelectBox | string | Id of Select Box return string if is exists Revision, then returns HTML Code of full SelectBox else returns empty string |

checkPaths() : voidThis function checks if needed version paths exists and were created if neccessary
Inherited from: \Version::checkPaths()
createNewVersion() : voidThis function creats new version in right folder.
Inherited from: \Version::createNewVersion()
createNewXml() : stringXML Writer helps for create this file.
| Type | Description |
|---|---|
| string | returns content of xml file |

deleteFile( $sFirstFile = "") : boolThis function deletes files and the the folder, for given path.
Inherited from: \Version::deleteFile()| Name | Type | Description |
|---|---|---|
| $sFirstFile |
| Type | Description |
|---|---|
| bool | return true if successful |

deleteRows( $iModHistory) : voidDeletes the row wich id of mod_history
| Name | Type | Description |
|---|---|---|
| $iModHistory |

getFormatTimestamp() : arrayThis function generate version names for select-box
Inherited from: \Version::getFormatTimestamp()| Type | Description |
|---|---|
| array | returns an array of revision file names |

getModuleHistoryTable() : voidFunction reads rows variables from table con_mod and init with the class members.

getSelectBox( $aTempVesions, $sIdOfSelectBox) : void| Name | Type | Description |
|---|---|---|
| $aTempVesions | ||
| $sIdOfSelectBox |

getTextBox(string $sName, $sInitValue, integer $iWidth, $bDisabled = false) : string| Name | Type | Description |
|---|---|---|
| $sName | string | The name of Input Textfield. |
| $sInitValue | ||
| $iWidth | integer | width of Input Textfield |
| $bDisabled |
| Type | Description |
|---|---|
| string | HTML Code of Input Textfield |

getTextarea(string $sName, $sInitValue, integer $iWidth, integer $iHeight, $sId = "") : string| Name | Type | Description |
|---|---|---|
| $sName | string | The name of Textarea. |
| $sInitValue | ||
| $iWidth | integer | width of Textarea |
| $iHeight | integer | height of Textarea |
| $sId |
| Type | Description |
|---|---|
| string | HTML Code of Textarea |

initRevisions() : arrayIts filter also timestamp and version files
| Type | Description |
|---|---|
| array | returns xml file names |

prune() : voidThis function looks if maximum number of stored versions is achieved.
Inherited from: \Version::prune()If true, it will be delete the first version.

setBodyNodeDescription(string $sDesc) : void| Name | Type | Description |
|---|---|---|
| $sDesc | string | Content of node |

setData(string $sKey, string $sValue) : array| Name | Type | Description |
|---|---|---|
| $sKey | string | |
| $sValue | string |
| Type | Description |
|---|---|
| array | returns an array for body node |