| @@ 86-97 (lines=12) @@ | ||
| 83 | * |
|
| 84 | * @return bool |
|
| 85 | */ |
|
| 86 | public function shouldSortWhenCreating() |
|
| 87 | { |
|
| 88 | if (!isset($this->sortable)) { |
|
| 89 | return true; |
|
| 90 | } |
|
| 91 | ||
| 92 | if (!isset($this->sortable['sort_when_creating'])) { |
|
| 93 | return true; |
|
| 94 | } |
|
| 95 | ||
| 96 | return $this->sortable['sort_when_creating']; |
|
| 97 | } |
|
| 98 | ||
| 99 | /** |
|
| 100 | * Determine if the table should be reorder when deleting |
|
| @@ 104-115 (lines=12) @@ | ||
| 101 | * |
|
| 102 | * @return bool |
|
| 103 | */ |
|
| 104 | public function shouldSortWhenDeleting() |
|
| 105 | { |
|
| 106 | if (!isset($this->sortable)) { |
|
| 107 | return true; |
|
| 108 | } |
|
| 109 | ||
| 110 | if (!isset($this->sortable['sort_when_deleting'])) { |
|
| 111 | return true; |
|
| 112 | } |
|
| 113 | ||
| 114 | return $this->sortable['sort_when_deleting']; |
|
| 115 | } |
|
| 116 | ||
| 117 | /** |
|
| 118 | * Swaps the order of this model with the model 'below' this model. |
|