-
Notifications
You must be signed in to change notification settings - Fork 2
Delete an element
Benjamin Kaiser edited this page Apr 15, 2021
·
1 revision
Deletes an element, including the element's descendant elements:
boolean delete ( integer $node )
Type | Name | Description |
---|---|---|
integer | $element | The ID of the element to delete. |
Return: TRUE on success or FALSE on error.
// add a topmost element
$element = $f3t->add(0, 'Main');
// add child element
$child1 = $f3t->add($element, 'Child 1');
// add another child element
$child2 = $f3t->add($element, 'Child 2');
// delete the "Child 2" element
$f3t->delete($child2);