Methods

The Version object constructor, initializes class variables

__construct(array $aCfg, array $aCfgClient, object $oDB, integer $iClient, object $sArea, object $iFrame) : void

Parameters

$aCfg

array

$aCfgClient

array

$oDB

object

$iClient

integer

$sArea

object

$iFrame

object

The general SelectBox function for get Revision.

buildSelectBox(string $sTableForm, string $sAddHeader, string $sLabelOfSelectBox, string $sIdOfSelectBox) 

Parameters

$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

This function creats new version in right folder.

createNewVersion() : void

This function creats an xml file. XML Writer helps for create this file.

createNewXml() : string

Returns

stringreturns content of xml file

This function deletes files and the the folder, for given path.

deleteFile($sFirstFile) : bool

Parameters

$sFirstFile

Returns

boolreturn true if successful

Displays your notification

displayNotification(string $sOutPut) : void

Parameters

$sOutPut

string

Get the frontendpath to revision

getFilePath() : string

Returns

stringreturns path to revision file

This function generate version names for select-box

getFormatTimestamp() : array

Returns

arrayreturns an array of revision file names

Get the last revision file

getLastRevision() : array

Returns

arrayreturns Last Revision

Revision Files

getRevisionFiles() : array

Returns

arrayreturns all Revison File

Build new Textfield with below parameters

getTextBox(string $sName, $sInitValue, integer $iWidth, $bDisabled) : string

Parameters

$sName

string

The name of Input Textfield.

$sInitValue

$iWidth

integer

width of Input Textfield

$bDisabled

Returns

stringHTML Code of Input Textfield

Build new Textarea with below parameters

getTextarea(string $sName, $sInitValue, integer $iWidth, integer $iHeight, $sId) : string

Parameters

$sName

string

The name of Textarea.

$sInitValue

$iWidth

integer

width of Textarea

$iHeight

integer

height of Textarea

$sId

Returns

stringHTML Code of Textarea

Set new node for xml file of description

setBodyNodeDescription(string $sDesc) 

Parameters

$sDesc

string

Content of node

This function initialize the body node of xml file

setData(string $sKey, string $sValue) : array

Parameters

$sKey

string

$sValue

string

Returns

arrayreturns an array for body node

This function generate version names for select-box

setVarForm($sKey, $sValue) : array

Parameters

$sKey

$sValue

Returns

arrayreturns an array of revision file names

This function checks if needed version paths exists and were created if neccessary

checkPaths() : void

Inits the first element of revision files

getFirstRevision() : string

Returns

stringthe name of xml files

This function inits version files. Its filter also timestamp and version files

initRevisions() : array

Returns

arrayreturns xml file names

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

prune() : void

Messagebox for build selectBox. Dynamic allocation for type.

getMessages() 

return array the attributes alt and poput returns

Makes new and init Revision Name

getRevision() : integer

Returns

integerreturns number of Revison File

A Class Function for fill version files

getSelectBox($aTempVesions, $sIdOfSelectBox) 

Parameters

$aTempVesions

$sIdOfSelectBox

 Properties

 

Revision files of current file

$aRevisionFiles 

access public
 

Displays Notification only onetimes per object

$iDisplayNotification 

 

Body data of xml file

$aBodyData 

access protected
 

For init global variable

$aCfg 

access protected
 

For init global variable $cfgClient

$aCfgClient 

access protected
 

For init variables

$aVarForm 

access protected
 

Timestamp

$dActualTimestamp 

access protected
 

Time of created

$dCreated 

access protected
 

Time of last modified

$dLastModified 

access protected
 

Timestamp

$dTimestamp 

access protected
 

For init global variable $client

$iClient 

access protected
 

For init global variable $frame

$iFrame 

access protected
 

Identity the Id of Content Type

$iIdentity 

access protected
 

Number of Revision

$iRevisionNumber 

access private
 

Database object

$oDB 

access protected
 

Alternative Path for save version files

$sAlternativePath 

access protected
 

For init global variable $area

$sArea 

access protected
 

md5 coded name of author

$sAuthor 

access protected
 

Id of Type

$sType 

access protected
 

To take control versioning is switched off

$bVersionCreatActive 

access private