Allow extend query on reorder controller, on 'simple' sortMode
This commit is contained in:
parent
82a385b338
commit
f0b4691168
|
|
@ -215,10 +215,9 @@ class ReorderController extends ControllerBehavior
|
|||
$records = null;
|
||||
|
||||
if ($this->sortMode == 'simple') {
|
||||
$records = $model
|
||||
->orderBy($model->getSortOrderColumn())
|
||||
->get()
|
||||
;
|
||||
$records = $model->orderBy($model->getSortOrderColumn());
|
||||
$this->controller->reorderExtendQuery($records);
|
||||
$records = $records->get();
|
||||
}
|
||||
elseif ($this->sortMode == 'nested') {
|
||||
$records = $model->getEagerRoot();
|
||||
|
|
@ -227,6 +226,16 @@ class ReorderController extends ControllerBehavior
|
|||
return $records;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend the query used for finding reorder records. Extra conditions
|
||||
* can be applied to the query, for example, $query->withTrashed();
|
||||
* @param October\Rain\Database\Builder $query
|
||||
* @return void
|
||||
*/
|
||||
public function reorderExtendQuery($query)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Widgets
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in New Issue