contenido\classes\class.versionModule.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
\VersionModule
- Parent(s)
- \Version
Properties

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

__construct(string $iIdMod, array $aCfg, array $aCfgClient, object $oDB, integer $iClient, object $sArea, object $iFrame) : voidThe class versionStyle object constructor, initializes class variables
| Name | Type | Description |
|---|---|---|
| $iIdMod | string | The name of style file |
| $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 |

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

getModuleTable() : 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 |

initXmlReader(string $sPath) : arrayThis function read an xml file nodes
| Name | Type | Description |
|---|---|---|
| $sPath | string | Path to file |
| Type | Description |
|---|---|
| array | returns array width this four nodes |

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.

renderReloadScript(string $sArea, $iIdModule, object $sess) : stringFunction returns javascript which refreshes contenido frames for file list an subnavigation.
This is neccessary, if filenames where changed, when a history entry is restored
| Name | Type | Description |
|---|---|---|
| $sArea | string | name of contenido area in which this procedure should be done |
| $iIdModule | ||
| $sess | object | Contenido session object |
| Type | Description |
|---|---|
| string | - Javascript for refrehing frames |

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 |