DatabaseTreeNode extends TreeRepresentationNode
Represents a node in a TCA database setup
Table of Contents
Properties
- $additionalData : array<string|int, mixed>
- $callbackAction : string
- Callback function that is called e.g after a click on the label
- $childNodes : TreeNodeCollection|null
- Child Nodes
- $class : string
- Node CSS Class
- $expanded : bool
- $hasChildren : bool
- $icon : string|Icon
- Node Icon
- $id : string|int
- Node Identifier
- $label : string
- Node Label
- $parentNode : TreeNode|null
- Parent Node
- $selectable : bool
- $selected : bool
- $type : string
- Node Type
Methods
- __construct() : mixed
- Constructor
- __serialize() : array<string|int, mixed>
- Returns class state to be serialized.
- __unserialize() : void
- Fills the current node with the given serialized information
- compareTo() : int
- Compares a node to another one.
- dataFromArray() : mixed
- Sets data of the node by a given data array
- equals() : bool
- Compares a node if it's identical to another node by the id property.
- getAdditionalData() : array<string|int, mixed>
- getCallbackAction() : string
- Returns the callback action
- getChildNodes() : TreeNodeCollection
- Returns child nodes collection
- getClass() : string
- getExpanded() : bool
- Gets the expand state
- getIcon() : string|Icon
- getId() : string|int
- Returns the identifier
- getLabel() : string
- getParentNode() : TreeNode
- Returns the parent node
- getSelectable() : bool
- Gets the selectable property
- getSelected() : bool
- Gets the select state
- getSortValue() : mixed
- Gets the sort value
- getType() : string
- hasChildNodes() : bool
- Returns TRUE if the node has child nodes attached
- hasChildren() : bool
- Gets the hasChildren property
- removeChildNodes() : mixed
- Removes child nodes collection
- setCallbackAction() : mixed
- Sets the callback action
- setChildNodes() : mixed
- Sets the child nodes collection
- setClass() : mixed
- setExpanded() : mixed
- Sets the expand state
- setHasChildren() : mixed
- Sets the hasChildren property
- setIcon() : mixed
- setId() : mixed
- Sets the identifier
- setLabel() : mixed
- setParentNode() : mixed
- Sets the parent node
- setSelectable() : mixed
- Sets the selectable property
- setSelected() : mixed
- Sets the select state
- setSortValue() : mixed
- Sets the sort value
- setType() : mixed
- toArray() : array<string|int, mixed>
- Returns the node in an array representation that can be used for serialization
Properties
$additionalData
protected
array<string|int, mixed>
$additionalData
= []
This is part of the category tree performance hack.
$callbackAction
Callback function that is called e.g after a click on the label
protected
string
$callbackAction
= ''
$childNodes
Child Nodes
protected
TreeNodeCollection|null
$childNodes
$class
Node CSS Class
protected
string
$class
= ''
$expanded
protected
bool
$expanded
= true
$hasChildren
protected
bool
$hasChildren
= false
$icon
Node Icon
protected
string|Icon
$icon
= ''
$id
Node Identifier
protected
string|int
$id
= ''
$label
Node Label
protected
string
$label
= ''
$parentNode
Parent Node
protected
TreeNode|null
$parentNode
$selectable
protected
bool
$selectable
$selected
protected
bool
$selected
= false
$type
Node Type
protected
string
$type
= ''
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
You can move an initial data array to initialize the instance and further objects. This is useful for the deserialization.
Parameters
- $data : array<string|int, mixed> = []
__serialize()
Returns class state to be serialized.
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__unserialize()
Fills the current node with the given serialized information
public
__unserialize(array<string|int, mixed> $arrayRepresentation) : void
Parameters
- $arrayRepresentation : array<string|int, mixed>
Tags
compareTo()
Compares a node to another one.
public
compareTo(TreeNode $other) : int
Returns: 1 if its greater than the other one -1 if its smaller than the other one 0 if its equal
Parameters
- $other : TreeNode
Return values
int —see description above
dataFromArray()
Sets data of the node by a given data array
public
dataFromArray(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
equals()
Compares a node if it's identical to another node by the id property.
public
equals(TreeNode $other) : bool
Parameters
- $other : TreeNode
Return values
boolgetAdditionalData()
public
getAdditionalData() : array<string|int, mixed>
This is part of the category tree performance hack
Return values
array<string|int, mixed>getCallbackAction()
Returns the callback action
public
getCallbackAction() : string
Return values
stringgetChildNodes()
Returns child nodes collection
public
getChildNodes() : TreeNodeCollection
Return values
TreeNodeCollectiongetClass()
public
getClass() : string
Return values
stringgetExpanded()
Gets the expand state
public
getExpanded() : bool
Return values
boolgetIcon()
public
getIcon() : string|Icon
Return values
string|IcongetId()
Returns the identifier
public
getId() : string|int
Return values
string|intgetLabel()
public
getLabel() : string
Return values
stringgetParentNode()
Returns the parent node
public
getParentNode() : TreeNode
Return values
TreeNodegetSelectable()
Gets the selectable property
public
getSelectable() : bool
Return values
boolgetSelected()
Gets the select state
public
getSelected() : bool
Return values
boolgetSortValue()
Gets the sort value
public
getSortValue() : mixed
getType()
public
getType() : string
Return values
stringhasChildNodes()
Returns TRUE if the node has child nodes attached
public
hasChildNodes() : bool
Return values
boolhasChildren()
Gets the hasChildren property
public
hasChildren() : bool
Return values
boolremoveChildNodes()
Removes child nodes collection
public
removeChildNodes() : mixed
setCallbackAction()
Sets the callback action
public
setCallbackAction(string $callbackAction) : mixed
Parameters
- $callbackAction : string
setChildNodes()
Sets the child nodes collection
public
setChildNodes(TreeNodeCollection $childNodes) : mixed
Parameters
- $childNodes : TreeNodeCollection
setClass()
public
setClass(string $class) : mixed
Parameters
- $class : string
setExpanded()
Sets the expand state
public
setExpanded(bool $expanded) : mixed
Parameters
- $expanded : bool
setHasChildren()
Sets the hasChildren property
public
setHasChildren(bool $value) : mixed
Parameters
- $value : bool
setIcon()
public
setIcon(string|Icon $icon) : mixed
Parameters
- $icon : string|Icon
setId()
Sets the identifier
public
setId(string|int $id) : mixed
Parameters
- $id : string|int
setLabel()
public
setLabel(string $label) : mixed
Parameters
- $label : string
setParentNode()
Sets the parent node
public
setParentNode([TreeNode|null $parentNode = null ]) : mixed
Parameters
- $parentNode : TreeNode|null = null
setSelectable()
Sets the selectable property
public
setSelectable(bool $selectable) : mixed
Parameters
- $selectable : bool
setSelected()
Sets the select state
public
setSelected(bool $selected) : mixed
Parameters
- $selected : bool
setSortValue()
Sets the sort value
public
setSortValue(mixed $sortValue) : mixed
Parameters
- $sortValue : mixed
setType()
public
setType(string $type) : mixed
Parameters
- $type : string
toArray()
Returns the node in an array representation that can be used for serialization
public
toArray([bool $addChildNodes = true ]) : array<string|int, mixed>
Parameters
- $addChildNodes : bool = true