Méthode |
Description |
|
afterDelete ( Model $Model ) |
|
|
beforeDelete ( Model $Model, $cascade = true ) |
|
|
beforeSave ( Model $Model, $options = [] ) |
Sets the weight for new items so they end up at end |
|
isFirst ( Model $Model, Int $id = null ) : Boolean, |
Returns true if the specified item is the first item |
|
isLast ( Model $Model, Int $id = null ) : Boolean, |
Returns true if the specified item is the last item |
|
moveDown ( Model $Model, mixed $id = null, mixed $number = 1 ) : boolean |
Reorder the node, by moving it $number spaces down. Defaults to 1 |
|
moveTo ( Model $Model, integer $id = null, integer $newWeight = null ) : boolean |
Moving a node to specific weight, it will shift the rest of the table to make room. |
|
moveUp ( Model $Model, mixed $id = null, mixed $number = 1 ) : boolean |
Reorder the node, by moving it $number spaces up. Defaults to 1 |
|
removefromlist ( Model $Model, integer $id ) : boolean |
Removing an item from the list means to set its field to 0 and updating the other items to be "complete" |
|
resetWeights ( Model $Model ) : boolean |
This will create weights based on display field. The purpose of the method is to create
weights for tables that existed before this behavior was added. |
|
setup ( Model $Model, $config = [] ) |
|
|
sortBy ( Model $Model, array $order, mixed $foreignKey = null ) |
Take in an order array and sorts the list based on that order specification
and creates new weights for it. If no foreign key is supplied, all lists
will be sorted. |
|