TreeMapperInterface
in
Mapper of a nested-set tree entity.
The methods come from TreeTrait; services (TreeTrait) call them on a verified type.
Table of Contents
Methods
- closeTreeGap() : Result
- getTreeSubtree() : Result
- insertTreeNode() : Result
- inTreeLock() : Result
- moveSubtree() : Result
- moveTreeNode() : Result
- reorderTreeChildren() : Result
Methods
closeTreeGap()
public
closeTreeGap(int $lft, int $rgt, TreeConfig $config) : Result
Parameters
- $lft : int
- $rgt : int
- $config : TreeConfig
Return values
ResultgetTreeSubtree()
public
getTreeSubtree(int $id, TreeConfig $config) : Result
Parameters
- $id : int
- $config : TreeConfig
Return values
ResultinsertTreeNode()
public
insertTreeNode(int $id, TreeConfig $config) : Result
Parameters
- $id : int
- $config : TreeConfig
Return values
ResultinTreeLock()
public
inTreeLock(TreeConfig $config, callable(): Result $operation) : Result
Parameters
- $config : TreeConfig
- $operation : callable(): Result
Return values
ResultmoveSubtree()
public
moveSubtree(int $id, int|null $newParentId, TreeConfig $config[, int|null $afterSiblingId = null ][, TreeMoveExpectation|null $expectation = null ]) : Result
Parameters
- $id : int
- $newParentId : int|null
- $config : TreeConfig
- $afterSiblingId : int|null = null
- $expectation : TreeMoveExpectation|null = null
Return values
ResultmoveTreeNode()
public
moveTreeNode(int $id, int $direction, TreeConfig $config) : Result
Parameters
- $id : int
- $direction : int
- $config : TreeConfig
Return values
ResultreorderTreeChildren()
public
reorderTreeChildren(int|null $parentId, array<int, int> $orderedIds, TreeConfig $config) : Result
Parameters
- $parentId : int|null
- $orderedIds : array<int, int>
- $config : TreeConfig