PHP Class Contao\DataContainer

Provide methods to handle data container arrays.
Inheritance: extends Backend
Datei anzeigen Open project: contao/core-bundle Class Usage Examples

Protected Properties

Property Type Description
$blnUploadable boolean True if one of the form fields is uploadable
$intId integer Current ID
$noReload boolean Reload the page after the form has been submitted
$objActiveRecord Model | FilesModel Active record
$onsubmit array Form attribute "onsubmit"
$procedure array WHERE clause of the database query
$root array IDs of all root records
$strField string Name of the current field
$strInputName string Name attribute of the current input field
$strPalette string Name of the current palette
$strTable string Name of the current table
$values array Values for the WHERE clause of the database query
$varValue mixed Value of the current field

Public Methods

Method Description
__get ( string $strKey ) : mixed Return an object property
__set ( string $strKey, mixed $varValue ) Set an object property
getPalette ( ) : string Return the name of the current palette
help ( string $strClass = '' ) : string Return the field explanation as HTML string

Protected Methods

Method Description
combiner ( array $names ) : array Generate possible palette names from an array by taking the first value and either adding or not adding the following values
generateButtons ( array $arrRow, string $strTable, array $arrRootIds = [], boolean $blnCircularReference = false, array $arrChildRecordIds = null, string $strPrevious = null, string $strNext = null ) : string Compile buttons from the table configuration array and return them as HTML
generateGlobalButtons ( ) : string Compile global buttons from the table configuration array and return them as HTML
row ( string $strPalette = null ) : string Render a row of a box and return it as HTML string
save ( mixed $varValue ) Save the current value
switchToEdit ( integer $id ) : string Return a query string that switches into edit mode

Method Details

__get() public method

Return an object property
public __get ( string $strKey ) : mixed
$strKey string
return mixed

__set() public method

Set an object property
public __set ( string $strKey, mixed $varValue )
$strKey string
$varValue mixed

combiner() protected method

Generate possible palette names from an array by taking the first value and either adding or not adding the following values
protected combiner ( array $names ) : array
$names array
return array

generateButtons() protected method

Compile buttons from the table configuration array and return them as HTML
protected generateButtons ( array $arrRow, string $strTable, array $arrRootIds = [], boolean $blnCircularReference = false, array $arrChildRecordIds = null, string $strPrevious = null, string $strNext = null ) : string
$arrRow array
$strTable string
$arrRootIds array
$blnCircularReference boolean
$arrChildRecordIds array
$strPrevious string
$strNext string
return string

generateGlobalButtons() protected method

Compile global buttons from the table configuration array and return them as HTML
protected generateGlobalButtons ( ) : string
return string

getPalette() abstract public method

Return the name of the current palette
abstract public getPalette ( ) : string
return string

help() public method

Return the field explanation as HTML string
public help ( string $strClass = '' ) : string
$strClass string
return string

row() protected method

Render a row of a box and return it as HTML string
protected row ( string $strPalette = null ) : string
$strPalette string
return string

save() abstract protected method

Save the current value
abstract protected save ( mixed $varValue )
$varValue mixed

switchToEdit() protected method

Return a query string that switches into edit mode
protected switchToEdit ( integer $id ) : string
$id integer
return string

Property Details

$blnUploadable protected_oe property

True if one of the form fields is uploadable
protected bool $blnUploadable
return boolean

$intId protected_oe property

Current ID
protected int $intId
return integer

$noReload protected_oe property

Reload the page after the form has been submitted
protected bool $noReload
return boolean

$objActiveRecord protected_oe property

Active record
protected Model,contao|FilesModel,contao $objActiveRecord
return Model | FilesModel

$onsubmit protected_oe property

Form attribute "onsubmit"
protected array $onsubmit
return array

$procedure protected_oe property

WHERE clause of the database query
protected array $procedure
return array

$root protected_oe property

IDs of all root records
protected array $root
return array

$strField protected_oe property

Name of the current field
protected string $strField
return string

$strInputName protected_oe property

Name attribute of the current input field
protected string $strInputName
return string

$strPalette protected_oe property

Name of the current palette
protected string $strPalette
return string

$strTable protected_oe property

Name of the current table
protected string $strTable
return string

$values protected_oe property

Values for the WHERE clause of the database query
protected array $values
return array

$varValue protected_oe property

Value of the current field
protected mixed $varValue
return mixed