contenido\classes\class.versionFile.php
Description: Class of File System 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-05 }}
- Version
- 1.0.0
\VersionFile
- Parent(s)
- \Version
Properties

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

$sDescripionIts not required to use it.
- Type
- n/a
- Access
- protected
Methods

__construct(string $iIdOfType, array $aFileInfo, $sFileName, $sTypeContent, array $aCfg, array $aCfgClient, object $oDB, integer $iClient, object $sArea, object $iFrame, $sVersionFileName = '') : voidThe class versionStyle object constructor, initializes class variables
| Name | Type | Description |
|---|---|---|
| $iIdOfType | string | The name of style file |
| $aFileInfo | array | Get FileInformation from table file_information |
| $sFileName | ||
| $sTypeContent | ||
| $aCfg | array | |
| $aCfgClient | array | |
| $oDB | object | |
| $iClient | integer | |
| $sArea | object | |
| $iFrame | object | |
| $sVersionFileName |

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 |

getPathFile() : stringThis function reads the path of file
| Type | Description |
|---|---|
| string | the path of file |

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) : \{array}This function read an xml file nodes
| Name | Type | Description |
|---|---|---|
| $sPath | string | Path to file |
| Type | Description |
|---|---|
| \{array} | returns array width 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, string $sFilename, 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 |
|
| $sFilename | string |
|
| $sess | 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 |