WithChildrenTrait
Trait for elements with children
Table of Contents
Properties
- $children : array<string|int, mixed>
Methods
- getChildren() : array<string|int, mixed>
- gets children
- preRemove() : BaseModel
- pre remove hook
- cmpPosition() : int
- sortChildren() : void
- sort children by position
Properties
$children
protected
array<string|int, mixed>
$children
= []
children
Methods
getChildren()
gets children
public
getChildren([string|null $locale = null ][, bool $reset = false ]) : array<string|int, mixed>
Parameters
- $locale : string|null = null
- $reset : bool = false
Return values
array<string|int, mixed>preRemove()
pre remove hook
public
preRemove() : BaseModel
Return values
BaseModelcmpPosition()
protected
cmpPosition(ModelWithChildren $a, ModelWithChildren $b) : int
Parameters
- $a : ModelWithChildren
- $b : ModelWithChildren
Return values
intsortChildren()
sort children by position
protected
sortChildren() : void