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.

createNewXml() : string

XML Writer helps for create this file.

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.

initRevisions() : array

Its filter also timestamp and version files

Returns

arrayreturns xml file names

This function looks if maximum number of stored versions is achieved.

prune() : void

If true, it will be delete the first version.

Messagebox for build selectBox.

getMessages() 

Dynamic allocation for type. 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

 

$aRevisionFiles 
access public
 

$iDisplayNotification 
 

$aBodyData 
access protected
 

$aCfg 
access protected
 

$aCfgClient 
access protected
 

$aVarForm 
access protected
 

$dActualTimestamp 
access protected
 

$dCreated 
access protected
 

$dLastModified 
access protected
 

$dTimestamp 
access protected
 

$iClient 
access protected
 

$iFrame 
access protected
 

$iIdentity 
access protected
 

$iRevisionNumber 
access private
 

$oDB 
access protected
 

$sAlternativePath 
access protected
 

$sArea 
access protected
 

$sAuthor 
access protected
 

$sType 
access protected
 

$bVersionCreatActive 
access private