DatabaseTreeDataProvider extends AbstractTableConfigurationTreeDataProvider
TCA tree data provider
Table of Contents
Constants
- MODE_CHILDREN = 1
- MODE_PARENT = 2
Properties
- $availableItems : array<string|int, mixed>
- $columnConfiguration : array<string|int, 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 : int
- $nodeSortValues : array<string|int, mixed>
- node sort values (the orderings from foreign_Table_where evaluation)
- $nonSelectableLevelList : string
- $rootNode : TreeNode
- Root Node
- $rootUid : int
- $selectedList : string
- $startingPoints : array<string|int, int>
- $tableName : string
- $tableWhere : string
- $treeData : TreeNode
- $treeId : string
Methods
- __construct() : mixed
- getExpandAll() : bool
- Gets the expandAll
- getExpandedList() : string
- Gets the list for expanded nodes
- 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() : int
- Gets the lookup mode
- getNodes() : mixed
- Gets the nodes
- getNonSelectableLevelList() : string
- Gets the list for non selectable tree levels
- getRoot() : DatabaseTreeNode
- Gets the root node
- getRootUid() : int
- Gets the root uid
- 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() : mixed
- Init the tree data
- setAvailableItems() : mixed
- setExpandAll() : mixed
- Sets the expandAll
- setExpandedList() : mixed
- Sets the list for expanded nodes
- setItemUnselectableList() : mixed
- Setter for $itemUnselectableList
- setItemWhiteList() : mixed
- Setter for the itemWhiteList
- setLabelField() : mixed
- Sets the label field
- setLevelMaximum() : mixed
- Sets the levelMaximum
- setLookupField() : mixed
- Sets the lookup field
- setLookupMode() : mixed
- Sets the lookup mode
- setNonSelectableLevelList() : mixed
- Sets the list for non selectable tree levels
- setRootUid() : mixed
- Sets the root uid
- setSelectedList() : mixed
- Sets the list for selected nodes
- setStartingPoints() : void
- Sets the root uids
- setTableName() : mixed
- Sets the table name
- setTableWhere() : mixed
- 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() : mixed
- Loads the tree data (all possible children)
Constants
MODE_CHILDREN
public
mixed
MODE_CHILDREN
= 1
MODE_PARENT
public
mixed
MODE_PARENT
= 2
Properties
$availableItems
protected
array<string|int, mixed>
$availableItems
= []
Tags
$columnConfiguration
Stores TCA-Configuration of the LookUpField in tableName
protected
array<string|int, 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
int
$lookupMode
= self::MODE_CHILDREN
$nodeSortValues
node sort values (the orderings from foreign_Table_where evaluation)
protected
array<string|int, mixed>
$nodeSortValues
= []
$nonSelectableLevelList
protected
string
$nonSelectableLevelList
= '0'
$rootNode
Root Node
protected
TreeNode
$rootNode
$rootUid
protected
int
$rootUid
= 0
$selectedList
protected
string
$selectedList
= ''
$startingPoints
protected
array<string|int, int>
$startingPoints
= [0]
$tableName
protected
string
$tableName
= ''
$tableWhere
protected
string
$tableWhere
= ''
$treeData
protected
TreeNode
$treeData
$treeId
protected
string
$treeId
= ''
Methods
__construct()
public
__construct(EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $eventDispatcher : EventDispatcherInterface
getExpandAll()
Gets the expandAll
public
getExpandAll() : bool
Return values
boolgetExpandedList()
Gets the list for expanded nodes
public
getExpandedList() : string
Return values
stringgetItemUnselectableList()
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
stringgetLevelMaximum()
Gets the levelMaximum
public
getLevelMaximum() : int
Return values
intgetLookupField()
Gets the lookup field
public
getLookupField() : string
Return values
stringgetLookupMode()
Gets the lookup mode
public
getLookupMode() : int
Return values
intgetNodes()
Gets the nodes
public
getNodes(TreeNode $node) : mixed
Parameters
- $node : TreeNode
getNonSelectableLevelList()
Gets the list for non selectable tree levels
public
getNonSelectableLevelList() : string
Return values
stringgetRoot()
Gets the root node
public
getRoot() : DatabaseTreeNode
Return values
DatabaseTreeNodegetRootUid()
Gets the root uid
public
getRootUid() : int
since v11, will be removed in v12. Use getStartingPoints() instead.
Return values
intgetSelectedList()
Gets the list for selected nodes
public
getSelectedList() : string
Return values
stringgetStartingPoints()
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
stringgetTableWhere()
Gets the tableWhere clause
public
getTableWhere() : string
Return values
stringgetTreeId()
Gets the id of the tree
public
getTreeId() : string
Return values
stringinitializeTreeData()
Init the tree data
public
initializeTreeData() : mixed
setAvailableItems()
public
setAvailableItems(array<string|int, mixed> $availableItems) : mixed
Parameters
- $availableItems : array<string|int, mixed>
See property comment
setExpandAll()
Sets the expandAll
public
setExpandAll(bool $expandAll) : mixed
Parameters
- $expandAll : bool
setExpandedList()
Sets the list for expanded nodes
public
setExpandedList(string $expandedList) : mixed
Parameters
- $expandedList : string
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) : mixed
Parameters
- $labelField : string
setLevelMaximum()
Sets the levelMaximum
public
setLevelMaximum(int $levelMaximum) : mixed
Parameters
- $levelMaximum : int
setLookupField()
Sets the lookup field
public
setLookupField(string $lookupField) : mixed
Parameters
- $lookupField : string
setLookupMode()
Sets the lookup mode
public
setLookupMode(int $lookupMode) : mixed
Parameters
- $lookupMode : int
setNonSelectableLevelList()
Sets the list for non selectable tree levels
public
setNonSelectableLevelList(string $nonSelectableLevelList) : mixed
Parameters
- $nonSelectableLevelList : string
setRootUid()
Sets the root uid
public
setRootUid(int $rootUid) : mixed
since v11, will be removed in v12. Use setStartingPoints() instead.
Parameters
- $rootUid : int
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) : mixed
Parameters
- $tableName : string
setTableWhere()
Sets the tableWhere clause
public
setTableWhere(string $tableWhere) : mixed
Parameters
- $tableWhere : string
setTreeId()
Sets the id of the tree
public
setTreeId(string $treeId) : mixed
Parameters
- $treeId : string
buildRepresentationForNode()
Builds a complete node including children
protected
buildRepresentationForNode(TreeNode $basicNode[, DatabaseTreeNode|null $parent = null ][, int $level = 0 ]) : DatabaseTreeNode
Parameters
- $basicNode : TreeNode
- $parent : DatabaseTreeNode|null = null
- $level : int = 0
Return values
DatabaseTreeNode —Node object
getChildrenOf()
Gets node children
protected
getChildrenOf(TreeNode $node, int $level) : TreeNodeCollection|null
Parameters
- $node : TreeNode
- $level : int
Return values
TreeNodeCollection|nullgetChildrenUidsFromChildrenRelation()
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>getLanguageService()
protected
getLanguageService() : LanguageService|null
Return values
LanguageService|nullgetRelatedRecords()
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
boollistFieldQuery()
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() : mixed