TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
DatabaseTreeDataProvider Class Reference
Inheritance diagram for DatabaseTreeDataProvider:
AbstractTableConfigurationTreeDataProvider AbstractTreeDataProvider

Public Member Functions

 setLabelField ($labelField)
 
 getLabelField ()
 
 setTableName ($tableName)
 
 getTableName ()
 
 setLookupField ($lookupField)
 
 getLookupField ()
 
 setLookupMode ($lookupMode)
 
 getLookupMode ()
 
 getNodes (\TYPO3\CMS\Backend\Tree\TreeNode $node)
 
 getRoot ()
 
 setRootUid ($rootUid)
 
 getRootUid ()
 
 setTableWhere ($tableWhere)
 
 getTableWhere ()
 
 initializeTreeData ()
 
- Public Member Functions inherited from AbstractTableConfigurationTreeDataProvider
 setTreeId ($treeId)
 
 getTreeId ()
 
 setExpandAll ($expandAll)
 
 getExpandAll ()
 
 setLevelMaximum ($levelMaximum)
 
 getLevelMaximum ()
 
 setExpandedList ($expandedList)
 
 getExpandedList ()
 
 initializeTreeData ()
 
 setSelectedList ($selectedList)
 
 getSelectedList ()
 
 setNonSelectableLevelList ($nonSelectableLevelList)
 
 getNonSelectableLevelList ()
 
 setItemWhiteList (array $itemWhiteList)
 
 getItemWhiteList ()
 
 setItemUnselectableList (array $itemUnselectableList)
 
 getItemUnselectableList ()
 
- Public Member Functions inherited from AbstractTreeDataProvider
 getRoot ()
 
 getNodes (\TYPO3\CMS\Backend\Tree\TreeNode $node)
 

Public Attributes

const SIGNAL_PostProcessTreeData = 'PostProcessTreeData'
 
const MODE_CHILDREN = 1
 
const MODE_PARENT = 2
 

Protected Member Functions

 loadTreeData ()
 
 getRelatedRecords (array $row)
 
 getChildrenUidsFromChildrenRelation (array $row)
 
 listFieldQuery ($fieldName, $queryId)
 
 emitPostProcessTreeDataSignal ()
 
 getSignalSlotDispatcher ()
 
 getObjectManager ()
 
- Protected Member Functions inherited from AbstractTableConfigurationTreeDataProvider
 isExpanded (\TYPO3\CMS\Backend\Tree\TreeNode $node)
 

Protected Attributes

 $tableName = ''
 
 $treeId = ''
 
 $labelField = ''
 
 $tableWhere = ''
 
 $lookupMode = self::MODE_CHILDREN
 
 $lookupField = ''
 
 $rootUid = 0
 
 $idCache = []
 
 $columnConfiguration
 
 $nodeSortValues = []
 
 $generatedTSConfig = []
 
 $signalSlotDispatcher
 
- Protected Attributes inherited from AbstractTableConfigurationTreeDataProvider
 $expandAll = false
 
 $levelMaximum = 4
 
 $treeData = null
 
 $treeId
 
 $nonSelectableLevelList = '0'
 
 $expandedList = ''
 
 $selectedList = ''
 
 $itemWhiteList = []
 
 $itemUnselectableList = []
 
- Protected Attributes inherited from AbstractTreeDataProvider
 $rootNode = null
 

Detailed Description

TCA tree data provider

Definition at line 29 of file DatabaseTreeDataProvider.php.

Member Function Documentation

emitPostProcessTreeDataSignal ( )
protected

Emits the post processing tree data signal.

Returns
void

Definition at line 521 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\getSignalSlotDispatcher().

Referenced by DatabaseTreeDataProvider\initializeTreeData().

getChildrenUidsFromChildrenRelation ( array  $row)
protected

Gets related children records depending on TCA configuration

Parameters
array$row
Returns
array

Definition at line 434 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\getLookupField(), DatabaseTreeDataProvider\getTableName(), GeneralUtility\intExplode(), and GeneralUtility\makeInstance().

Referenced by DatabaseTreeDataProvider\getRelatedRecords().

getLabelField ( )

Gets the label field

Returns
string

Definition at line 115 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$labelField.

getLookupField ( )
getLookupMode ( )

Gets the lookup mode

Returns
int

Definition at line 178 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$lookupMode.

Referenced by DatabaseTreeDataProvider\getRelatedRecords().

getNodes ( \TYPO3\CMS\Backend\Tree\TreeNode  $node)

Gets the nodes

Parameters
\TYPO3\CMS\Backend\Tree\TreeNode$node
Returns

Definition at line 189 of file DatabaseTreeDataProvider.php.

getObjectManager ( )
protected

Get the ObjectManager

Returns
ObjectManager

Definition at line 548 of file DatabaseTreeDataProvider.php.

References GeneralUtility\makeInstance().

Referenced by DatabaseTreeDataProvider\getSignalSlotDispatcher().

getRelatedRecords ( array  $row)
protected

Gets related records depending on TCA configuration

Parameters
array$row
Returns
array

Definition at line 379 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\getChildrenUidsFromChildrenRelation(), and DatabaseTreeDataProvider\getLookupMode().

getRoot ( )

Gets the root node

Returns

Definition at line 198 of file DatabaseTreeDataProvider.php.

getRootUid ( )

Gets the root uid

Returns
int

Definition at line 219 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$rootUid.

Referenced by DatabaseTreeDataProvider\loadTreeData().

getSignalSlotDispatcher ( )
protected
getTableWhere ( )

Gets the tableWhere clause

Returns
string

Definition at line 240 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$tableWhere.

listFieldQuery (   $fieldName,
  $queryId 
)
protected

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

Parameters
string$fieldNamethe name of the field to be queried
int$queryIdthe uid to search for
Returns
int[] all uids found

Definition at line 489 of file DatabaseTreeDataProvider.php.

References ExpressionBuilder\EQ, DatabaseTreeDataProvider\getTableName(), and GeneralUtility\makeInstance().

loadTreeData ( )
protected

Loads the tree data (all possible children)

Returns
void

Definition at line 309 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\getRootUid().

Referenced by DatabaseTreeDataProvider\initializeTreeData().

setLabelField (   $labelField)

Sets the label field

Parameters
string$labelField
Returns
void

Definition at line 105 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$labelField.

setLookupField (   $lookupField)

Sets the lookup field

Parameters
string$lookupField
Returns
void

Definition at line 147 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$lookupField.

setLookupMode (   $lookupMode)

Sets the lookup mode

Parameters
int$lookupMode
Returns
void

Definition at line 168 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$lookupMode.

setRootUid (   $rootUid)

Sets the root uid

Parameters
int$rootUid
Returns
void

Definition at line 209 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$rootUid.

setTableName (   $tableName)

Sets the table name

Parameters
string$tableName
Returns
void

Definition at line 126 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$tableName.

setTableWhere (   $tableWhere)

Sets the tableWhere clause

Parameters
string$tableWhere
Returns
void

Definition at line 230 of file DatabaseTreeDataProvider.php.

References DatabaseTreeDataProvider\$tableWhere.

Member Data Documentation

$columnConfiguration
protected

Definition at line 80 of file DatabaseTreeDataProvider.php.

$generatedTSConfig = []
protected

Definition at line 92 of file DatabaseTreeDataProvider.php.

$idCache = []
protected

Definition at line 73 of file DatabaseTreeDataProvider.php.

$labelField = ''
protected
$lookupField = ''
protected
$lookupMode = self::MODE_CHILDREN
protected
$nodeSortValues = []
protected

Definition at line 87 of file DatabaseTreeDataProvider.php.

$rootUid = 0
protected
$signalSlotDispatcher
protected
$tableName = ''
protected
$tableWhere = ''
protected
$treeId = ''
protected

Definition at line 43 of file DatabaseTreeDataProvider.php.

const MODE_CHILDREN = 1

Definition at line 32 of file DatabaseTreeDataProvider.php.

const MODE_PARENT = 2

Definition at line 33 of file DatabaseTreeDataProvider.php.

const SIGNAL_PostProcessTreeData = 'PostProcessTreeData'

Definition at line 31 of file DatabaseTreeDataProvider.php.