| Methods |
public
static
|
bootManagesClosures()
Create, update and delete the closures when the model is saved.
Create, update and delete the closures when the model is saved.
|
#
|
protected
|
checkIfDeletable(): void
Check if the node can be deleted.
Check if the node can be deleted.
Throws
|
#
|
protected
|
checkIfParentIdIsValid(): void
Check that the parent is not the model itself or one of
its descendants (which triggers an exception).
Check that the parent is not the model itself or one of
its descendants (which triggers an exception).
Throws
|
#
|
protected
|
createSelfClosure(): int
Insert the self-closure for the model.
Insert the self-closure for the model.
|
#
|
protected
|
attachSubtree(): int
Create the closures to attach the model and its subtree
to the rest of the tree (ie. the model's ancestors).
This…
Create the closures to attach the model and its subtree
to the rest of the tree (ie. the model's ancestors).
This assumes that the "internal" closures of the subtree
already exist.
|
#
|
protected
|
detachSubtree(): int
Delete the closures attaching the model and its subtree
to the rest of the tree (ie. the model's ancestors),
but not…
Delete the closures attaching the model and its subtree
to the rest of the tree (ie. the model's ancestors),
but not the "internal" closures of the subtree.
|
#
|
protected
|
deleteClosures(string|null $operator = null): int
Delete the ascending closures of the model and optionally its
descendants.
Delete the ascending closures of the model and optionally its
descendants.
Parameters
| $operator |
- '>' to detach the subtree (including the node) from the main tree
- '>=' to detach the descendants from the node
- null to delete all the subtree closures
|
|
#
|