contenido\classes\class.version.php

Show: PublicProtectedPrivateinherited
Table of Contents
Project: Contenido Content Management System

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

Package: Default
Children
\VersionFile
\VersionImport
\VersionLayout
\VersionModule

Properties

>VPropertyprotected$aBodyData
Body data of xml file
Details
Type
n/a
Access
protected  
>VPropertyprotected$aCfg
For init global variable
Details
Type
n/a
Access
protected  
>VPropertyprotected$aCfgClient
For init global variable $cfgClient
Details
Type
n/a
Access
protected  
>VPropertypublic$aRevisionFiles
Revision files of current file
Details
Type
n/a
Access
public  
>VPropertyprotected$aVarForm
For init variables
Details
Type
n/a
Access
protected  
>VPropertyprivate$bVersionCreatActive
To take control versioning is switched off
Details
Type
n/a
Access
private  
>VPropertyprotected$dActualTimestamp
Timestamp
Details
Type
n/a
Access
protected  
>VPropertyprotected$dCreated
Time of created
Details
Type
n/a
Access
protected  
>VPropertyprotected$dLastModified
Time of last modified
Details
Type
n/a
Access
protected  
>VPropertyprotected$dTimestamp
Timestamp
Details
Type
n/a
Access
protected  
>VPropertyprotected$iClient
For init global variable $client
Details
Type
n/a
Access
protected  
>VPropertypublic$iDisplayNotification
static
Displays Notification only onetimes per object
Details
Type
n/a
>VPropertyprotected$iFrame
For init global variable $frame
Details
Type
n/a
Access
protected  
>VPropertyprotected$iIdentity
Identity the Id of Content Type
Details
Type
n/a
Access
protected  
>VPropertyprotected$iRevisionNumber
Number of Revision
Details
Type
n/a
Access
private  
>VPropertyprotected$oDB
Database object
Details
Type
n/a
Access
protected  
>VPropertyprotected$sAlternativePath
Alternative Path for save version files
Details
Type
n/a
Access
protected  
>VPropertyprotected$sArea
For init global variable $area
Details
Type
n/a
Access
protected  
>VPropertyprotected$sAuthor
md5 coded name of author
Details
Type
n/a
Access
protected  
>VPropertyprotected$sType
Id of Type
Details
Type
n/a
Access
protected  

Methods

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

The Version object constructor, initializes class variables

Parameters
NameTypeDescription
$aCfgarray
$aCfgClientarray
$oDBobject
$iClientinteger
$sAreaobject
$iFrameobject
methodpublicbuildSelectBox(string $sTableForm, string $sAddHeader, string $sLabelOfSelectBox, string $sIdOfSelectBox) : void

The general SelectBox function for get Revision.

Parameters
NameTypeDescription
$sTableFormstring

The name of Table_Form class

$sAddHeaderstring

The Header Label of SelectBox Widget

$sLabelOfSelectBoxstring

The Label of SelectBox Widget

$sIdOfSelectBoxstring

Id of Select Box return string if is exists Revision, then returns HTML Code of full SelectBox else returns empty string

methodprotectedcheckPaths() : void

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

methodpubliccreateNewVersion() : void

This function creats new version in right folder.

methodpubliccreateNewXml() : string

This function creats an xml file.

XML Writer helps for create this file.

Returns
TypeDescription
stringreturns content of xml file
methodpublicdeleteFile( $sFirstFile = "") : bool

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

Parameters
NameTypeDescription
$sFirstFile
Returns
TypeDescription
boolreturn true if successful
methodpublicdisplayNotification(string $sOutPut) : void

Displays your notification

Parameters
NameTypeDescription
$sOutPutstring
methodpublicgetFilePath() : string

Get the frontendpath to revision

Returns
TypeDescription
stringreturns path to revision file
methodprotectedgetFirstRevision() : string

Inits the first element of revision files

Returns
TypeDescription
stringthe name of xml files
methodpublicgetFormatTimestamp() : array

This function generate version names for select-box

Returns
TypeDescription
arrayreturns an array of revision file names
methodpublicgetLastRevision() : array

Get the last revision file

Returns
TypeDescription
arrayreturns Last Revision
methodprivategetMessages() : void

Messagebox for build selectBox.

Dynamic allocation for type. return array the attributes alt and poput returns

methodprivategetRevision() : integer

Makes new and init Revision Name

Returns
TypeDescription
integerreturns number of Revison File
methodpublicgetRevisionFiles() : array

Revision Files

Returns
TypeDescription
arrayreturns all Revison File
methodprivategetSelectBox( $aTempVesions,  $sIdOfSelectBox) : void

A Class Function for fill version files

Parameters
NameTypeDescription
$aTempVesions
$sIdOfSelectBox
methodpublicgetTextBox(string $sName,  $sInitValue, integer $iWidth,  $bDisabled = false) : string

Build new Textfield with below parameters

Parameters
NameTypeDescription
$sNamestring

The name of Input Textfield.

$sInitValue
$iWidthinteger

width of Input Textfield

$bDisabled
Returns
TypeDescription
stringHTML Code of Input Textfield
methodpublicgetTextarea(string $sName,  $sInitValue, integer $iWidth, integer $iHeight,  $sId = "") : string

Build new Textarea with below parameters

Parameters
NameTypeDescription
$sNamestring

The name of Textarea.

$sInitValue
$iWidthinteger

width of Textarea

$iHeightinteger

height of Textarea

$sId
Returns
TypeDescription
stringHTML Code of Textarea
methodprotectedinitRevisions() : array

This function inits version files.

Its filter also timestamp and version files

Returns
TypeDescription
arrayreturns xml file names
methodprotectedprune() : void

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

If true, it will be delete the first version.

methodpublicsetBodyNodeDescription(string $sDesc) : void

Set new node for xml file of description

Parameters
NameTypeDescription
$sDescstring

Content of node

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

This function initialize the body node of xml file

Parameters
NameTypeDescription
$sKeystring
$sValuestring
Returns
TypeDescription
arrayreturns an array for body node
methodpublicsetVarForm( $sKey,  $sValue) : array

This function generate version names for select-box

Parameters
NameTypeDescription
$sKey
$sValue
Returns
TypeDescription
arrayreturns an array of revision file names
Documentation was generated by phpDocumentor 2.0.0a12.