|
| __construct ($con) |
|
| getChildren (int $start=0, ?int $id=null, string $sort='asc', array $fields=[]) |
|
| getParents (int $id, array $fields=[]) |
|
| getParent (int $id, array $fields=[]) |
|
| addNode ($data, int $target=0) |
|
| updatePosition (int $id, int $left, int $right) |
|
| deleteNode (int $node, bool $keep_children=true) |
|
| resetOrder () |
|
| setNodeParent (int $node, int $target=0) |
|
| setNodePosition (int $nodeA, int $nodeB, string $position='after') |
|
◆ __construct()
Constructs a new instance.
- Parameters
-
References $con.
◆ getChildren()
getChildren |
( |
int |
$start = 0 , |
|
|
?int |
$id = null , |
|
|
string |
$sort = 'asc' , |
|
|
array |
$fields = [] |
|
) |
| |
Gets the children.
- Parameters
-
int | $start | The start |
int | $id | The identifier |
string | $sort | The sort |
array | $fields | The fields |
- Returns
- dcRecord The children.
References getCondition().
◆ getParents()
getParents |
( |
int |
$id, |
|
|
array |
$fields = [] |
|
) |
| |
Gets the parents.
- Parameters
-
int | $id | The identifier |
array | $fields | The fields |
- Returns
- dcRecord The parents.
Reimplemented in dcCategories.
◆ getParent()
getParent |
( |
int |
$id, |
|
|
array |
$fields = [] |
|
) |
| |
Gets the parent.
- Parameters
-
int | $id | The identifier |
array | $fields | The fields |
- Returns
- dcRecord The parents.
Reimplemented in dcCategories.
◆ addNode()
addNode |
( |
|
$data, |
|
|
int |
$target = 0 |
|
) |
| |
Adds a node.
- Parameters
-
mixed | $data | The data |
int | $target | The target |
- Exceptions
-
- Returns
- mixed
◆ updatePosition()
updatePosition |
( |
int |
$id, |
|
|
int |
$left, |
|
|
int |
$right |
|
) |
| |
Update position
- Parameters
-
int | $id | The identifier |
int | $left | The left |
int | $right | The right |
◆ deleteNode()
deleteNode |
( |
int |
$node, |
|
|
bool |
$keep_children = true |
|
) |
| |
Delete a node
- Parameters
-
int | $node | The node |
bool | $keep_children | keep children |
- Exceptions
-
◆ resetOrder()
◆ setNodeParent()
setNodeParent |
( |
int |
$node, |
|
|
int |
$target = 0 |
|
) |
| |
Sets the node parent.
- Parameters
-
int | $node | The node |
int | $target | The target |
- Exceptions
-
◆ setNodePosition()
setNodePosition |
( |
int |
$nodeA, |
|
|
int |
$nodeB, |
|
|
string |
$position = 'after' |
|
) |
| |
Sets the node position.
- Parameters
-
int | $nodeA | The node a |
int | $nodeB | The node b |
string | $position | The position |
- Exceptions
-
◆ getCondition()
getCondition |
( |
string |
$start = 'AND' , |
|
|
string |
$prefix = '' |
|
) |
| |
|
protected |
Gets the condition.
- Parameters
-
string | $start | The start |
string | $prefix | The prefix |
- Returns
- string The condition.
Referenced by getChildren().
◆ $con
◆ $table
◆ $f_left
◆ $f_right
◆ $f_id
◆ $add_condition
The documentation for this class was generated from the following file: