PHP Class Contao\Versions

Inheritance: extends Controller
Exibir arquivo Open project: contao/core-bundle Class Usage Examples

Protected Properties

Property Type Description
$intPid integer Parent ID
$intUserId integer User ID
$strEditUrl string Edit URL
$strPath string File path
$strTable string Table
$strUsername string Username

Public Methods

Method Description
__construct ( string $strTable, integer $intPid ) Initialize the object
addToTemplate ( BackendTemplate $objTemplate ) Add a list of versions to a template
compare ( ) Compare versions
create ( ) Create a new version of a record
initialize ( ) Create the initial version of a record
renderDropdown ( ) : string Render the versions dropdown menu
restore ( integer $intVersion ) Restore a version
setEditUrl ( string $strEditUrl ) Set the edit URL
setUserId ( integer $intUserId ) Set the user ID
setUsername ( string $strUsername ) Set the username

Protected Methods

Method Description
getEditUrl ( ) : string Return the edit URL
getUserId ( ) : string Return the user ID
getUsername ( ) : string Return the username
implodeRecursive ( mixed $var, boolean $binary = false ) : string Implode a multi-dimensional array recursively

Method Details

__construct() public method

Initialize the object
public __construct ( string $strTable, integer $intPid )
$strTable string
$intPid integer

addToTemplate() public static method

Add a list of versions to a template
public static addToTemplate ( BackendTemplate $objTemplate )
$objTemplate BackendTemplate

compare() public method

Compare versions
public compare ( )

create() public method

Create a new version of a record
public create ( )

getEditUrl() protected method

Return the edit URL
protected getEditUrl ( ) : string
return string

getUserId() protected method

Return the user ID
protected getUserId ( ) : string
return string

getUsername() protected method

Return the username
protected getUsername ( ) : string
return string

implodeRecursive() protected method

Implode a multi-dimensional array recursively
protected implodeRecursive ( mixed $var, boolean $binary = false ) : string
$var mixed
$binary boolean
return string

initialize() public method

Create the initial version of a record
public initialize ( )

renderDropdown() public method

Render the versions dropdown menu
public renderDropdown ( ) : string
return string

restore() public method

Restore a version
public restore ( integer $intVersion )
$intVersion integer

setEditUrl() public method

Set the edit URL
public setEditUrl ( string $strEditUrl )
$strEditUrl string

setUserId() public method

Set the user ID
public setUserId ( integer $intUserId )
$intUserId integer

setUsername() public method

Set the username
public setUsername ( string $strUsername )
$strUsername string

Property Details

$intPid protected_oe property

Parent ID
protected int $intPid
return integer

$intUserId protected_oe property

User ID
protected int $intUserId
return integer

$strEditUrl protected_oe property

Edit URL
protected string $strEditUrl
return string

$strPath protected_oe property

File path
protected string $strPath
return string

$strTable protected_oe property

Table
protected string $strTable
return string

$strUsername protected_oe property

Username
protected string $strUsername
return string