contenido\classes\class.version.php
Description: We use super class Version to create a new Version.
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 modified 2009-11-06, Murat Purc, replaced deprecated functions (PHP 5.3 ready) }}
- Version
- 1.0.1
\Version
Properties
Methods

__construct(array $aCfg, array $aCfgClient, object $oDB, integer $iClient, object $sArea, object $iFrame) : voidThe Version 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) : voidThe general SelectBox function for get Revision.
| 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

createNewXml() : stringThis function creats an xml file.
XML 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.
| Name | Type | Description |
|---|---|---|
| $sFirstFile |
| Type | Description |
|---|---|
| bool | return true if successful |

displayNotification(string $sOutPut) : voidDisplays your notification
| Name | Type | Description |
|---|---|---|
| $sOutPut | string |

getFilePath() : stringGet the frontendpath to revision
| Type | Description |
|---|---|
| string | returns path to revision file |

getFirstRevision() : stringInits the first element of revision files
| Type | Description |
|---|---|
| string | the name of xml files |

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

getMessages() : voidMessagebox for build selectBox.
Dynamic allocation for type. return array the attributes alt and poput returns

getRevision() : integerMakes new and init Revision Name
| Type | Description |
|---|---|
| integer | returns number of Revison File |

getSelectBox( $aTempVesions, $sIdOfSelectBox) : voidA Class Function for fill version files
| Name | Type | Description |
|---|---|---|
| $aTempVesions | ||
| $sIdOfSelectBox |

getTextBox(string $sName, $sInitValue, integer $iWidth, $bDisabled = false) : stringBuild new Textfield with below parameters
| 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 = "") : stringBuild new Textarea with below parameters
| 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() : arrayThis function inits version files.
Its 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.
If true, it will be delete the first version.

setBodyNodeDescription(string $sDesc) : voidSet new node for xml file of description
| Name | Type | Description |
|---|---|---|
| $sDesc | string | Content of node |

setData(string $sKey, string $sValue) : arrayThis function initialize the body node of xml file
| Name | Type | Description |
|---|---|---|
| $sKey | string | |
| $sValue | string |
| Type | Description |
|---|---|
| array | returns an array for body node |