DatabaseTreeDataProvider extends AbstractTableConfigurationTreeDataProvider

TCA tree data provider

Attributes
#[Autoconfigure]
$public: true
$shared: false

Table of Contents

Constants

MODE_CHILDREN  = 1
MODE_PARENT  = 2

Properties

$availableItems  : array<string|int, mixed>
$columnConfiguration  : array<string, mixed>
Stores TCA-Configuration of the LookUpField in tableName
$eventDispatcher  : EventDispatcherInterface
$expandAll  : bool
$expandedList  : string
$idCache  : array<string|int, mixed>
$itemUnselectableList  : array<string|int, mixed>
Contains all ids which are not allowed to be selected
$itemWhiteList  : array<string|int, mixed>
Contains all ids which may be allowed to display according to beUser Rights and foreign_table_where (if type db)
$labelField  : string
$levelMaximum  : int
$lookupField  : string
$lookupMode  : self::MODE_*
$nodeSortValues  : array<string, mixed>
node sort values (the orderings from foreign_Table_where evaluation)
$nonSelectableLevelList  : string
$rootNode  : TreeNode
Root Node
$selectedList  : string
$startingPoints  : array<string|int, int>
$tableName  : string
$tableWhere  : string
$treeData  : TreeNode
$treeId  : string

Methods

__construct()  : mixed
getExpandAll()  : bool
Gets the expandAll
getItemUnselectableList()  : array<string|int, mixed>
Getter for $itemUnselectableList
getItemWhiteList()  : array<string|int, mixed>
Getter for the itemWhiteList
getLabelField()  : string
Gets the label field
getLevelMaximum()  : int
Gets the levelMaximum
getLookupField()  : string
Gets the lookup field
getLookupMode()  : self::MODE_*
Gets the lookup mode
getNodes()  : void
Gets the nodes
getNonSelectableLevelList()  : string
Gets the list for non selectable tree levels
getRoot()  : TreeNode
Gets the root node
getSelectedList()  : string
Gets the list for selected nodes
getStartingPoints()  : array<string|int, int>
Gets the root uids
getTableName()  : string
Gets the table name
getTableWhere()  : string
Gets the tableWhere clause
getTreeId()  : string
Gets the id of the tree
initializeTreeData()  : void
Init the tree data
setAvailableItems()  : mixed
setExpandAll()  : mixed
Sets the expandAll
setItemUnselectableList()  : mixed
Setter for $itemUnselectableList
setItemWhiteList()  : mixed
Setter for the itemWhiteList
setLabelField()  : void
Sets the label field
setLevelMaximum()  : mixed
Sets the levelMaximum
setLookupField()  : void
Sets the lookup field
setLookupMode()  : void
Sets the lookup mode
setNonSelectableLevelList()  : mixed
Sets the list for non selectable tree levels
setSelectedList()  : mixed
Sets the list for selected nodes
setStartingPoints()  : void
Sets the root uids
setTableName()  : void
Sets the table name
setTableWhere()  : void
Sets the tableWhere clause
setTreeId()  : mixed
Sets the id of the tree
buildRepresentationForNode()  : DatabaseTreeNode
Builds a complete node including children
getChildrenOf()  : TreeNodeCollection|null
Gets node children
getChildrenUidsFromChildrenRelation()  : array<string|int, mixed>
Gets related children records depending on TCA configuration
getChildrenUidsFromParentRelation()  : array<string|int, mixed>
Gets related records depending on TCA configuration
getLanguageService()  : LanguageService|null
getRelatedRecords()  : array<string|int, mixed>
Gets related records depending on TCA configuration
isExpanded()  : bool
Gets the expanded state of a given node
listFieldQuery()  : array<string|int, int>
Queries the table for a field which might contain a list.
loadTreeData()  : void
Loads the tree data (all possible children)

Constants

MODE_CHILDREN

public mixed MODE_CHILDREN = 1

Properties

$availableItems

protected array<string|int, mixed> $availableItems = []
Internal
Tags
todo:

This is a hack to speed up category tree calculation. See the comments in TcaCategory and AbstractItemProvider FormEngine classes.

$columnConfiguration

Stores TCA-Configuration of the LookUpField in tableName

protected array<string, mixed> $columnConfiguration

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$expandAll

protected bool $expandAll = false

$expandedList

protected string $expandedList = ''

$idCache

protected array<string|int, mixed> $idCache = []

$itemUnselectableList

Contains all ids which are not allowed to be selected

protected array<string|int, mixed> $itemUnselectableList = []

$itemWhiteList

Contains all ids which may be allowed to display according to beUser Rights and foreign_table_where (if type db)

protected array<string|int, mixed> $itemWhiteList = []

$labelField

protected string $labelField = ''

$levelMaximum

protected int $levelMaximum = 4

$lookupField

protected string $lookupField = ''

$lookupMode

protected self::MODE_* $lookupMode = self::MODE_CHILDREN

$nodeSortValues

node sort values (the orderings from foreign_Table_where evaluation)

protected array<string, mixed> $nodeSortValues = []

$nonSelectableLevelList

protected string $nonSelectableLevelList = '0'

$selectedList

protected string $selectedList = ''

$startingPoints

protected array<string|int, int> $startingPoints = [0]

$tableName

protected string $tableName = ''

$tableWhere

protected string $tableWhere = ''

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher) : mixed
Parameters
$eventDispatcher : EventDispatcherInterface

getExpandAll()

Gets the expandAll

public getExpandAll() : bool
Return values
bool

getItemUnselectableList()

Getter for $itemUnselectableList

public getItemUnselectableList() : array<string|int, mixed>
Return values
array<string|int, mixed>

getItemWhiteList()

Getter for the itemWhiteList

public getItemWhiteList() : array<string|int, mixed>
Return values
array<string|int, mixed>

getLabelField()

Gets the label field

public getLabelField() : string
Return values
string

getLevelMaximum()

Gets the levelMaximum

public getLevelMaximum() : int
Return values
int

getLookupField()

Gets the lookup field

public getLookupField() : string
Return values
string

getLookupMode()

Gets the lookup mode

public getLookupMode() : self::MODE_*
Return values
self::MODE_*

getNonSelectableLevelList()

Gets the list for non selectable tree levels

public getNonSelectableLevelList() : string
Return values
string

getSelectedList()

Gets the list for selected nodes

public getSelectedList() : string
Return values
string

getStartingPoints()

Gets the root uids

public getStartingPoints() : array<string|int, int>
Return values
array<string|int, int>

getTableName()

Gets the table name

public getTableName() : string
Return values
string

getTableWhere()

Gets the tableWhere clause

public getTableWhere() : string
Return values
string

getTreeId()

Gets the id of the tree

public getTreeId() : string
Return values
string

initializeTreeData()

Init the tree data

public initializeTreeData() : void

setAvailableItems()

public setAvailableItems(array<string|int, mixed> $availableItems) : mixed
Parameters
$availableItems : array<string|int, mixed>
Internal

See property comment

setExpandAll()

Sets the expandAll

public setExpandAll(bool $expandAll) : mixed
Parameters
$expandAll : bool

setItemUnselectableList()

Setter for $itemUnselectableList

public setItemUnselectableList(array<string|int, mixed> $itemUnselectableList) : mixed
Parameters
$itemUnselectableList : array<string|int, mixed>

setItemWhiteList()

Setter for the itemWhiteList

public setItemWhiteList(array<string|int, mixed> $itemWhiteList) : mixed
Parameters
$itemWhiteList : array<string|int, mixed>

setLabelField()

Sets the label field

public setLabelField(string $labelField) : void
Parameters
$labelField : string

setLevelMaximum()

Sets the levelMaximum

public setLevelMaximum(int $levelMaximum) : mixed
Parameters
$levelMaximum : int

setLookupField()

Sets the lookup field

public setLookupField(string $lookupField) : void
Parameters
$lookupField : string

setLookupMode()

Sets the lookup mode

public setLookupMode(self::MODE_* $lookupMode) : void
Parameters
$lookupMode : self::MODE_*

setNonSelectableLevelList()

Sets the list for non selectable tree levels

public setNonSelectableLevelList(string $nonSelectableLevelList) : mixed
Parameters
$nonSelectableLevelList : string

setSelectedList()

Sets the list for selected nodes

public setSelectedList(string $selectedList) : mixed
Parameters
$selectedList : string

setStartingPoints()

Sets the root uids

public setStartingPoints(array<string|int, int> $startingPoints) : void
Parameters
$startingPoints : array<string|int, int>

setTableName()

Sets the table name

public setTableName(string $tableName) : void
Parameters
$tableName : string

setTableWhere()

Sets the tableWhere clause

public setTableWhere(string $tableWhere) : void
Parameters
$tableWhere : string

setTreeId()

Sets the id of the tree

public setTreeId(string $treeId) : mixed
Parameters
$treeId : string

getChildrenUidsFromChildrenRelation()

Gets related children records depending on TCA configuration

protected getChildrenUidsFromChildrenRelation(array<string|int, mixed> $row) : array<string|int, mixed>
Parameters
$row : array<string|int, mixed>
Return values
array<string|int, mixed>

getChildrenUidsFromParentRelation()

Gets related records depending on TCA configuration

protected getChildrenUidsFromParentRelation(array<string|int, mixed> $row) : array<string|int, mixed>
Parameters
$row : array<string|int, mixed>
Return values
array<string|int, mixed>

getRelatedRecords()

Gets related records depending on TCA configuration

protected getRelatedRecords(array<string|int, mixed> $row) : array<string|int, mixed>
Parameters
$row : array<string|int, mixed>
Return values
array<string|int, mixed>

isExpanded()

Gets the expanded state of a given node

protected isExpanded(TreeNode $node) : bool
Parameters
$node : TreeNode
Return values
bool

listFieldQuery()

Queries the table for a field which might contain a list.

protected listFieldQuery(string $fieldName, int $queryId) : array<string|int, int>
Parameters
$fieldName : string

the name of the field to be queried

$queryId : int

the uid to search for

Return values
array<string|int, int>

all uids found

loadTreeData()

Loads the tree data (all possible children)

protected loadTreeData() : void

        
On this page

Search results