메소드 | 설명 | |
---|---|---|
addNewAt ( ) : string | Returns the value of the 'add_new_at' option | |
bootListify ( ) : boolean | Returns whether the scope has changed during the course of interaction with the model | |
decrementPosition ( ) : void | Decrease the position of this item without adjusting the rest of the list. | |
defaultPosition ( ) : mixed | Get the default item position | |
getListifyPosition ( ) : integer | Returns the value of the model's current position | |
higherItem ( ) : mixed | Return the next higher item in the list. | |
higherItems ( integer $limit = NULL ) : mixed | Return the next n higher items in the list. Selects all higher items by default | |
incrementPosition ( ) : void | Increase the position of this item without adjusting the rest of the list. | |
initListify ( array $options = [] ) : void | Required to override options and kick off the Listify's automatic list management. | |
insertAt ( integer $position = NULL ) : void | Insert the item at the given position (defaults to the top position of 1). | |
isDefaultPosition ( ) : boolean | Returns whether the item's current position matches the default position | |
isFirst ( ) : boolean | Returns if this object is the first in the list. | |
isInList ( ) : boolean | Returns whether the item is in the list | |
isLast ( ) : boolean | Returns if this object is the last in the list. | |
isNotInList ( ) : boolean | Returns whether the item is not in the list | |
listifyTop ( ) : string | Get the value of the "top_of_list" option | |
lowerItem ( ) : mixed | Return the next lower item in the list. | |
lowerItems ( integer $limit = NULL ) : mixed | Return the next n lower items in the list. Selects all lower items by default. | |
moveHigher ( ) : void | Swap positions with the next higher item, if one exists. | |
moveLower ( ) : void | Swap positions with the next lower item, if one exists. | |
moveToBottom ( ) : void | Move to the bottom of the list. If the item is already in the list, the items below it have their positions adjusted accordingly. | |
moveToTop ( ) : void | Move to the top of the list. If the item is already in the list, the items above it have their positions adjusted accordingly. | |
positionColumn ( ) : string | Get the name of the position 'column' option | |
removeFromList ( ) : void | Removes the item from the list. | |
scopeInList ( $query ) : Eloquent | An Eloquent scope that returns only items currently in the list | |
scopeListifyScope ( $query ) : Eloquent | An Eloquent scope based on the processed scope option | |
scopeName ( ) : mixed | Get the value of the 'scope' option | |
setListPosition ( integer $new_position ) : void | Sets the new position and saves it | |
setListifyConfig ( $key, $value ) : void | Updates a listify config value | |
setListifyPosition ( integer $position ) : void | Sets the value of the model's position | |
swapChangedAttributes ( ) : void | Temporarily swap changes attributes with current attributes |
메소드 | 설명 | |
---|---|---|
addToListBottom ( ) : void | Adds item to the bottom of the list | |
addToListTop ( ) : void | Adds item to the top of the list | |
assumeBottomPosition ( ) : void | Forces item to assume the bottom position in the list. | |
assumeTopPosition ( ) : void | Forces item to assume the top position in the list. | |
bottomItem ( mixed $except = NULL ) : mixed | Returns the bottom item | |
bottomPositionInList ( mixed $except = NULL ) : integer | Returns the bottom position number in the list | |
checkScope ( ) : void | Determines whether scope has changed. If so, it will move the current item to the top/bottom of the list and update all other items | |
decrementPositionsOnLowerItems ( integer $position = NULL ) : void | This has the effect of moving all the lower items up one. | |
getConditionStringFromQueryBuilder ( $query ) : string | Returns a raw WHERE clause based off of a Query Builder object | |
hasScopeChanged ( ) : boolean | Returns whether the scope has changed during the course of interaction with the model | |
incrementPositionsOnAllItems ( ) : void | Increments position of all items in the list. | |
incrementPositionsOnHigherItems ( ) : void | This has the effect of moving all the higher items down one. | |
incrementPositionsOnLowerItems ( integer $position ) : void | This has the effect of moving all the lower items down one. | |
insertAtPosition ( integer $position ) : void | Inserts the item at a particular location in the list. All items around it will be modified | |
listifyList ( ) : mixed | Creates an instance of the current class scope as a list | |
primaryKey ( ) : string | Returns the primary key of the current Eloquent instance | |
reloadPosition ( ) : void | Reloads the position value of the current item. This is only called when an item is deleted and is here to prevent unsetting the position column which would prevent other items from being moved properly | |
scopeCondition ( ) : string | Returns the raw WHERE clause to be used as the Listify scope | |
shufflePositionsOnIntermediateItems ( integer $old_position, integer $new_position, string $avoid_id = NULL ) : void | Reorders intermediate items to support moving an item from old_position to new_position. | |
updatePositions ( ) : void | Updates all items based on the original position of the item and the new position of the item |
public static bootListify ( ) : boolean | ||
리턴 | boolean |
public decrementPosition ( ) : void | ||
리턴 | void |
public getListifyPosition ( ) : integer | ||
리턴 | integer |
public higherItem ( ) : mixed | ||
리턴 | mixed | Returned item will be of the same type as the current class instance |
public higherItems ( integer $limit = NULL ) : mixed | ||
$limit | integer | The number of items to return |
리턴 | mixed | Returned items will be of the same type as the current class instance |
public incrementPosition ( ) : void | ||
리턴 | void |
public initListify ( array $options = [] ) : void | ||
$options | array | [column=>string, scope=>string|BelongsTo|Builder, top_of_list=>int, add_new_at=>string] |
리턴 | void |
public isDefaultPosition ( ) : boolean | ||
리턴 | boolean |
public isNotInList ( ) : boolean | ||
리턴 | boolean |
public listifyTop ( ) : string | ||
리턴 | string |
public lowerItems ( integer $limit = NULL ) : mixed | ||
$limit | integer | The number of items to return |
리턴 | mixed | Returned items will be of the same type as the current class instance |
public moveHigher ( ) : void | ||
리턴 | void |
public moveToBottom ( ) : void | ||
리턴 | void |
public positionColumn ( ) : string | ||
리턴 | string |
public scopeInList ( $query ) : Eloquent | ||
$query | ||
리턴 | Eloquent | Query Builder instance |
public scopeListifyScope ( $query ) : Eloquent | ||
$query | An Eloquent Query Builder instance | |
리턴 | Eloquent | Query Builder instance |
public setListPosition ( integer $new_position ) : void | ||
$new_position | integer | |
리턴 | void |
public setListifyConfig ( $key, $value ) : void | ||
리턴 | void |
public setListifyPosition ( integer $position ) : void | ||
$position | integer | |
리턴 | void |
public swapChangedAttributes ( ) : void | ||
리턴 | void |