\App\Base\TraitsWithChildrenTrait

Trait for elements with children

Summary

Methods
Properties
Constants
getChildren()
preRemove()
No public properties found
No constants found
sortChildren()
cmpPosition()
$children
N/A
No private methods found
No private properties found
N/A

Properties

$children

$children : array

Type

array — children

Methods

getChildren()

getChildren(string|null  $locale = null, bool  $reset = false) : array

gets children

Parameters

string|null $locale
bool $reset

Returns

array —

preRemove()

preRemove() : \App\Base\Abstracts\Models\BaseModel|self

pre remove hook

Returns

\App\Base\Abstracts\Models\BaseModel|self —

sortChildren()

sortChildren() : mixed

sort children by position

Returns

mixed —

cmpPosition()

cmpPosition(\App\Base\Abstracts\Models\ModelWithChildren  $a, \App\Base\Abstracts\Models\ModelWithChildren  $b) : int

Parameters

\App\Base\Abstracts\Models\ModelWithChildren $a
\App\Base\Abstracts\Models\ModelWithChildren $b

Returns

int —