PHP Trait Pagekit\Site\Model\NodeModelTrait

Inheritance: use trait Pagekit\Database\ORM\ModelTrait
Show file Open project: pagekit/pagekit

Protected Properties

Property Type Description
$nodes

Public Methods

Method Description
deleting ( $event, Pagekit\Site\Model\Node $node )
find ( mixed $id, boolean $cached = false ) : static Retrieves an entity by its identifier.
findAll ( boolean $cached = false ) : static[] Retrieves all entities.
findByMenu ( $menu, $cached = false ) : static[] Retrieves all nodes by menu.
fixOrphanedNodes ( ) : integer Sets parent_id of orphaned nodes to zero.
modelFind ( )
saving ( $event, Pagekit\Site\Model\Node $node )

Method Details

deleting() public static method

public static deleting ( $event, Pagekit\Site\Model\Node $node )
$node Pagekit\Site\Model\Node

find() public static method

Retrieves an entity by its identifier.
public static find ( mixed $id, boolean $cached = false ) : static
$id mixed
$cached boolean
return static

findAll() public static method

Retrieves all entities.
public static findAll ( boolean $cached = false ) : static[]
$cached boolean
return static[]

findByMenu() public static method

Retrieves all nodes by menu.
public static findByMenu ( $menu, $cached = false ) : static[]
return static[]

fixOrphanedNodes() public static method

Sets parent_id of orphaned nodes to zero.
public static fixOrphanedNodes ( ) : integer
return integer

modelFind() public method

public modelFind ( )

saving() public static method

public static saving ( $event, Pagekit\Site\Model\Node $node )
$node Pagekit\Site\Model\Node

Property Details

$nodes protected static property

protected static $nodes