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) : void
The 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) : void
The 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() : void
This function checks if needed version paths exists and were created if neccessary


createNewXml() : string
This function creats an xml file.
XML Writer helps for create this file.
Type | Description |
---|---|
string | returns content of xml file |


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


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


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


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


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


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


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


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


getTextBox(string $sName, $sInitValue, integer $iWidth, $bDisabled = false) : string
Build 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 = "") : string
Build 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() : array
This function inits version files.
Its filter also timestamp and version files
Type | Description |
---|---|
array | returns xml file names |


prune() : void
This function looks if maximum number of stored versions is achieved.
If true, it will be delete the first version.


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


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