PHP Класс Contao\DC_Table

Наследование: extends DataContainer, implements listable, implements editable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$arrModule array The current back end module
$bid string ID of the button container
$blnCreateNewVersion boolean True if a new version has to be created
$ctable array Names of the child tables
$current array IDs of all records that are currently displayed
$firstOrderBy string First sorting field
$limit string Limit (database query)
$orderBy array Order by (database query)
$ptable string Name of the parent table
$set array Fields of a new or duplicated record
$total string Total (database query)
$treeView boolean Show the current table as tree

Открытые методы

Метод Описание
__construct ( string $strTable, array $arrModule = [] ) Initialize the object
__get ( string $strKey ) : mixed Return an object property
__set ( string $strKey, mixed $varValue ) Set an object property
ajaxTreeView ( integer $id, integer $level ) : string Generate a particular subpart of the tree and return it as HTML string
copy ( boolean $blnDoNotRedirect = false ) : integer | boolean Duplicate a particular record of the current table
copyAll ( ) Move all selected records
create ( array $set = [] ) Insert a new row into a database table
cut ( boolean $blnDoNotRedirect = false ) Assign a new position to an existing record
cutAll ( ) Move all selected records
delete ( boolean $blnDoNotRedirect = false ) Delete a record of the current table table and save it to tl_undo
deleteAll ( ) Delete all selected records
deleteChilds ( string $table, integer $id, array &$delete ) Recursively get all related table names and records
edit ( integer $intId = null, integer $ajaxId = null ) : string Auto-generate a form to edit the current database record
editAll ( integer $intId = null, integer $ajaxId = null ) : string Auto-generate a form to edit all records that are currently shown
getPalette ( ) : string Return the name of the current palette
move ( ) Change the order of two neighbour database records
overrideAll ( ) : string Auto-generate a form to override all records that are currently shown
show ( ) : string Return all non-excluded fields of a record as HTML table
showAll ( ) : string List all records of a particular table
undo ( ) Restore one or more deleted records

Защищенные методы

Метод Описание
copyChilds ( string $table, integer $insertID, integer $id, integer $parentId ) Duplicate all child records of a duplicated record
filterMenu ( integer $intFilterPanel ) : string Generate the filter panel and return it as HTML string
formatCurrentValue ( string $field, mixed $value, integer $mode ) : string Return the formatted group header as string
formatGroupHeader ( string $field, mixed $value, integer $mode, array $row ) : string Return the formatted group header as string
generateTree ( string $table, integer $id, array $arrPrevNext, boolean $blnHasSorting, integer $intMargin, array $arrClipboard = null, boolean $blnCircularReference = false, boolean $protectedPage = false, boolean $blnNoRecursion = false, array $arrFound = [] ) : string Recursively generate the tree and return it as HTML string
getNewPosition ( string $mode, integer $pid = null, boolean $insertInto = false ) Calculate the new position of a moved or inserted record
limitMenu ( boolean $blnOptional = false ) : string Return a select menu to limit results
listView ( ) : string List all records of the current table and return them as HTML string
paginationMenu ( ) : string Return a pagination menu to browse results
panel ( ) : string Build the sort panel and return it as string
parentView ( ) : string Show header of the parent table and list all records of the current table
reviseTable ( ) Delete all incomplete and unrelated records
save ( mixed $varValue ) Save the current value
searchMenu ( ) : string Return a search form that allows to search results using regular expressions
sortMenu ( ) : string Return a select menu that allows to sort results by a particular field
treeView ( ) : string List all records of the current table as tree and return them as HTML string

Описание методов

__construct() публичный Метод

Initialize the object
public __construct ( string $strTable, array $arrModule = [] )
$strTable string
$arrModule array

__get() публичный Метод

Return an object property
public __get ( string $strKey ) : mixed
$strKey string
Результат mixed

__set() публичный Метод

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

ajaxTreeView() публичный Метод

Generate a particular subpart of the tree and return it as HTML string
public ajaxTreeView ( integer $id, integer $level ) : string
$id integer
$level integer
Результат string

copy() публичный Метод

Duplicate a particular record of the current table
public copy ( boolean $blnDoNotRedirect = false ) : integer | boolean
$blnDoNotRedirect boolean
Результат integer | boolean

copyAll() публичный Метод

Move all selected records
public copyAll ( )

copyChilds() защищенный Метод

Duplicate all child records of a duplicated record
protected copyChilds ( string $table, integer $insertID, integer $id, integer $parentId )
$table string
$insertID integer
$id integer
$parentId integer

create() публичный Метод

Insert a new row into a database table
public create ( array $set = [] )
$set array

cut() публичный Метод

Assign a new position to an existing record
public cut ( boolean $blnDoNotRedirect = false )
$blnDoNotRedirect boolean

cutAll() публичный Метод

Move all selected records
public cutAll ( )

delete() публичный Метод

Delete a record of the current table table and save it to tl_undo
public delete ( boolean $blnDoNotRedirect = false )
$blnDoNotRedirect boolean

deleteAll() публичный Метод

Delete all selected records
public deleteAll ( )

deleteChilds() публичный Метод

Recursively get all related table names and records
public deleteChilds ( string $table, integer $id, array &$delete )
$table string
$id integer
$delete array

edit() публичный Метод

Auto-generate a form to edit the current database record
public edit ( integer $intId = null, integer $ajaxId = null ) : string
$intId integer
$ajaxId integer
Результат string

editAll() публичный Метод

Auto-generate a form to edit all records that are currently shown
public editAll ( integer $intId = null, integer $ajaxId = null ) : string
$intId integer
$ajaxId integer
Результат string

filterMenu() защищенный Метод

Generate the filter panel and return it as HTML string
protected filterMenu ( integer $intFilterPanel ) : string
$intFilterPanel integer
Результат string

formatCurrentValue() защищенный Метод

Return the formatted group header as string
protected formatCurrentValue ( string $field, mixed $value, integer $mode ) : string
$field string
$value mixed
$mode integer
Результат string

formatGroupHeader() защищенный Метод

Return the formatted group header as string
protected formatGroupHeader ( string $field, mixed $value, integer $mode, array $row ) : string
$field string
$value mixed
$mode integer
$row array
Результат string

generateTree() защищенный Метод

Recursively generate the tree and return it as HTML string
protected generateTree ( string $table, integer $id, array $arrPrevNext, boolean $blnHasSorting, integer $intMargin, array $arrClipboard = null, boolean $blnCircularReference = false, boolean $protectedPage = false, boolean $blnNoRecursion = false, array $arrFound = [] ) : string
$table string
$id integer
$arrPrevNext array
$blnHasSorting boolean
$intMargin integer
$arrClipboard array
$blnCircularReference boolean
$protectedPage boolean
$blnNoRecursion boolean
$arrFound array
Результат string

getNewPosition() защищенный Метод

Calculate the new position of a moved or inserted record
protected getNewPosition ( string $mode, integer $pid = null, boolean $insertInto = false )
$mode string
$pid integer
$insertInto boolean

getPalette() публичный Метод

Return the name of the current palette
public getPalette ( ) : string
Результат string

limitMenu() защищенный Метод

Return a select menu to limit results
protected limitMenu ( boolean $blnOptional = false ) : string
$blnOptional boolean
Результат string

listView() защищенный Метод

List all records of the current table and return them as HTML string
protected listView ( ) : string
Результат string

move() публичный Метод

Change the order of two neighbour database records
public move ( )

overrideAll() публичный Метод

Auto-generate a form to override all records that are currently shown
public overrideAll ( ) : string
Результат string

paginationMenu() защищенный Метод

Return a pagination menu to browse results
protected paginationMenu ( ) : string
Результат string

panel() защищенный Метод

Build the sort panel and return it as string
protected panel ( ) : string
Результат string

parentView() защищенный Метод

Show header of the parent table and list all records of the current table
protected parentView ( ) : string
Результат string

reviseTable() защищенный Метод

Delete all incomplete and unrelated records
protected reviseTable ( )

save() защищенный Метод

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

searchMenu() защищенный Метод

Return a search form that allows to search results using regular expressions
protected searchMenu ( ) : string
Результат string

show() публичный Метод

Return all non-excluded fields of a record as HTML table
public show ( ) : string
Результат string

showAll() публичный Метод

List all records of a particular table
public showAll ( ) : string
Результат string

sortMenu() защищенный Метод

Return a select menu that allows to sort results by a particular field
protected sortMenu ( ) : string
Результат string

treeView() защищенный Метод

List all records of the current table as tree and return them as HTML string
protected treeView ( ) : string
Результат string

undo() публичный Метод

Restore one or more deleted records
public undo ( )

Описание свойств

$arrModule защищенное свойство

The current back end module
protected array $arrModule
Результат array

$bid защищенное свойство

ID of the button container
protected string $bid
Результат string

$blnCreateNewVersion защищенное свойство

True if a new version has to be created
protected bool $blnCreateNewVersion
Результат boolean

$ctable защищенное свойство

Names of the child tables
protected array $ctable
Результат array

$current защищенное свойство

IDs of all records that are currently displayed
protected array $current
Результат array

$firstOrderBy защищенное свойство

First sorting field
protected string $firstOrderBy
Результат string

$limit защищенное свойство

Limit (database query)
protected string $limit
Результат string

$orderBy защищенное свойство

Order by (database query)
protected array $orderBy
Результат array

$ptable защищенное свойство

Name of the parent table
protected string $ptable
Результат string

$set защищенное свойство

Fields of a new or duplicated record
protected array $set
Результат array

$total защищенное свойство

Total (database query)
protected string $total
Результат string

$treeView защищенное свойство

Show the current table as tree
protected bool $treeView
Результат boolean