Used for reordering and sorting records.

This behavior is implemented in the controller like so:

public $implement = [

public $reorderConfig = 'config_reorder.yaml';

The $reorderConfig property makes reference to the configuration values as either a YAML file, located in the controller view directory, or directly as a PHP array.

Public properties

public Model $model

Import model

public string $nameFrom

Model attribute to use for the display name

Show inherited public properties

Inherited public properties

Protected properties

protected $requiredProperties

Properties that must exist in the controller using this behavior.

protected array $requiredConfig

Configuration values that must exist when applying the primary config file.

protected array $actions

Visible actions in context of the controller

protected bool $showTree

Display parent/child relationships in the list.

protected string $sortMode

Reordering mode:

protected Backend\Classes\WidgetBase $toolbarWidget

Reference to the widget used for the toolbar.

Show inherited protected properties

Inherited protected properties

Public methods

public void __construct(Backend\Classes\Controller $controller)

Behavior constructor


public void onReorder()

public void reorder()

public void reorderExtendQuery(October\Rain\Database\Builder $query)

Extend the query used for finding reorder records. Extra conditions can be applied to the query, for example, $query->withTrashed();


public void reorderGetModel()

public string reorderGetRecordName($record)

Returns the display name for a record.

  • $record

public string reorderMakePartial(string $partial, array $params=array())

Controller accessor for making partials within this behavior.

  • string $partial
  • array $params

public void reorderRender()

Show inherited public methods

Inherited public methods

Protected methods

protected Collection getRecords()

Returns all the records from the supplied model.

protected void makeToolbarWidget()

protected void prepareVars()

Prepares common form data

protected void validateModel()

Validate the supplied form model.

Show inherited protected methods

Inherited protected methods