Backend\Widgets\Lists\HasSorting

Overview

HasSorting concern


Protected Properties

protected array $sortableColumns

All sortable columns.

protected string $sortColumn

Sets the list sorting column.

protected string $sortDirection

sortDirection sets the list sorting direction (asc, desc)

protected string $sortStep

sortStep allows for indeterminate sorting


Public Methods

public getSortColumn()

public getSortColumn(): void

getSortColumn returns the current sorting column, saved in a session or cached.

public getSortDirection()

public getSortDirection(): void

getSortDirection returns the current sort direction or default of 'asc'

public getSortStep()

public getSortStep(): int 

getSortStep returns the current indeterminate step

public isUserSorting()

public isUserSorting(): bool 

isUserSorting returns true if the user has requested a sort column

public onSort()

public onSort(): void

onSort AJAX handler for sorting the list.

Protected Methods

protected getSortableColumns()

protected getSortableColumns(): void

getSortableColumns returns a collection of columns which are sortable.

protected isSortable()

protected isSortable($column = null): void

isSortable returns true if the column can be sorted.

protected useSorting()

protected useSorting(): bool