DatabaseTreeDataProvider extends AbstractTableConfigurationTreeDataProvider

TCA tree data provider

Table of Contents

Constants

MODE_CHILDREN  : mixed = 1
MODE_PARENT  : mixed = 2

Properties

$availableItems  : array
$columnConfiguration  : array
Stores TCA-Configuration of the LookUpField in tableName
$eventDispatcher  : EventDispatcherInterface
$expandAll  : bool
$expandedList  : string
$idCache  : array
$itemUnselectableList  : array
Contains all ids which are not allowed to be selected
$itemWhiteList  : array
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
node sort values (the orderings from foreign_Table_where evaluation)
$nonSelectableLevelList  : string
$rootNode  : TreeNode
Root Node
$rootUid  : int
$selectedList  : string
$startingPoints  : 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
Getter for $itemUnselectableList
getItemWhiteList()  : array
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()  : 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
Gets related children records depending on TCA configuration
getChildrenUidsFromParentRelation()  : array
Gets related records depending on TCA configuration
getLanguageService()  : LanguageService|null
getRelatedRecords()  : array
Gets related records depending on TCA configuration
isExpanded()  : bool
Gets the expanded state of a given node
listFieldQuery()  : 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

Properties

$availableItems

protected array $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 $columnConfiguration

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$expandAll

protected bool $expandAll = false

$expandedList

protected string $expandedList = ''

$itemUnselectableList

Contains all ids which are not allowed to be selected

protected array $itemUnselectableList = []

$itemWhiteList

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

protected array $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 $nodeSortValues = []

$nonSelectableLevelList

protected string $nonSelectableLevelList = '0'

$selectedList

protected string $selectedList = ''

$startingPoints

protected 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

getExpandedList()

Gets the list for expanded nodes

public getExpandedList() : string
Return values
string

getItemUnselectableList()

Getter for $itemUnselectableList

public getItemUnselectableList() : array
Return values
array

getItemWhiteList()

Getter for the itemWhiteList

public getItemWhiteList() : array
Return values
array

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() : int
Return values
int

getNonSelectableLevelList()

Gets the list for non selectable tree levels

public getNonSelectableLevelList() : string
Return values
string

getRootUid()

Gets the root uid

public getRootUid() : int
Deprecated

since v11, will be removed in v12. Use getStartingPoints() instead.

Return values
int

getSelectedList()

Gets the list for selected nodes

public getSelectedList() : string
Return values
string

getStartingPoints()

Gets the root uids

public getStartingPoints() : int[]
Return values
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

setAvailableItems()

public setAvailableItems(array $availableItems) : mixed
Parameters
$availableItems : array
Internal

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 $itemUnselectableList) : mixed
Parameters
$itemUnselectableList : array

setItemWhiteList()

Setter for the itemWhiteList

public setItemWhiteList(array $itemWhiteList) : mixed
Parameters
$itemWhiteList : array

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
Deprecated

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(int[] $startingPoints) : void
Parameters
$startingPoints : 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

getChildrenUidsFromChildrenRelation()

Gets related children records depending on TCA configuration

protected getChildrenUidsFromChildrenRelation(array $row) : array
Parameters
$row : array
Return values
array

getChildrenUidsFromParentRelation()

Gets related records depending on TCA configuration

protected getChildrenUidsFromParentRelation(array $row) : array
Parameters
$row : array
Return values
array

getRelatedRecords()

Gets related records depending on TCA configuration

protected getRelatedRecords(array $row) : array
Parameters
$row : array
Return values
array

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) : int[]
Parameters
$fieldName : string

the name of the field to be queried

$queryId : int

the uid to search for

Return values
int[] —

all uids found

loadTreeData()

Loads the tree data (all possible children)

protected loadTreeData() : mixed
On this page

Search results