Property | Type | Description | |
---|---|---|---|
$_bound1 | integer | Memoized 1st boundary. | |
$_bound2 | integer | Memoized 2nd boundary. | |
$_boundaries | array | Memoized boundaries array. | |
$dispatcher | Illuminate\Events\Dispatcher | The event dispatcher instance. | |
$node | Node on which the move operation will be performed. | ||
$position | string | Move target position, one of: child, left, right, root. | |
$target | Destination node. |
Method | Description | |
---|---|---|
__construct ( |
Create a new Move class instance. | |
getEventDispatcher ( ) : Illuminate\Events\Dispatcher | Get the event dispatcher instance. | |
perform ( ) : |
Perform the move operation. | |
setEventDispatcher ( Illuminate\Events\Dispatcher $dispatcher = null ) : void | Set the event dispatcher instance. | |
to ( |
Easy static accessor for performing a move operation. | |
updateStructure ( ) : integer | Runs the SQL query associated with the update of the indexes affected by the move operation. |
Method | Description | |
---|---|---|
applyLockBetween ( integer $lft, integer $rgt ) : void | Applies a lock to the rows between the supplied index boundaries. | |
bound1 ( ) : integer | Computes the boundary. | |
bound2 ( ) : integer | Computes the other boundary. | |
boundaries ( ) : array | Computes the boundaries array. | |
fireMoveEvent ( string $event, boolean $halt = true ) : mixed | Fire the given move event for the model. | |
guardAgainstImpossibleMove ( ) : void | Check wether the current move is possible and if not, rais an exception. | |
hasChange ( ) : boolean | Check wether there should be changes in the downward tree structure. | |
parentId ( ) : integer | Computes the new parent id for the node being moved. | |
promotingToRoot ( ) : boolean | Check if we are promoting the provided instance to a root node. | |
quoteIdentifier ( mixed $value ) : string | Quotes an identifier for being used in a database query. | |
resolveNode ( $node ) : |
Resolves suplied node. Basically returns the node unchanged if supplied parameter is an instance of \Baum\Node. Otherwise it will try to find the node in the database. |
protected boundaries ( ) : array | ||
return | array |
public static getEventDispatcher ( ) : Illuminate\Events\Dispatcher | ||
return | Illuminate\Events\Dispatcher |
protected guardAgainstImpossibleMove ( ) : void | ||
return | void |
protected promotingToRoot ( ) : boolean | ||
return | boolean |
protected quoteIdentifier ( mixed $value ) : string | ||
$value | mixed | |
return | string |
protected resolveNode ( $node ) : |
||
return |
public static setEventDispatcher ( Illuminate\Events\Dispatcher $dispatcher = null ) : void | ||
$dispatcher | Illuminate\Events\Dispatcher | |
return | void |
public updateStructure ( ) : integer | ||
return | integer |
protected array $_boundaries | ||
return | array |
protected static Dispatcher,Illuminate\Events $dispatcher | ||
return | Illuminate\Events\Dispatcher |
protected Node,Baum $node | ||
return |
protected string $position | ||
return | string |