Backend\Behaviors\ListController\HasOverrides

Overview

HasOverrides in the controller


Public Methods

public listAfterReorder()

public listAfterReorder(
    October\Rain\Database\Model $record,
    string|null $definition = null
): void

listAfterReorder is called after the list record structure is reordered

public listExtendColumns()

public listExtendColumns(Backend\Widgets\List $host): void 

listExtendColumns is called after the list columns are defined.

public listExtendModel()

public listExtendModel(Model $model, $definition = null): Model 

listExtendModel controller override: Extend supplied model

public listExtendQuery()

public listExtendQuery(
    October\Rain\Database\Builder $query,
    $definition = null
): void

listExtendQuery controller override: Extend the query used for populating the list after the default query is processed.

public listExtendQueryBefore()

public listExtendQueryBefore(
    October\Rain\Database\Builder $query,
    $definition = null
): void

listExtendQueryBefore controller override: Extend the query used for populating the list before the default query is processed.

public listExtendRecords()

public listExtendRecords(
    Illuminate\Contracts\Pagination\LengthAwarePaginator|Illuminate\Database\Eloquent\Collection $records,
    $definition = null
): void

listExtendRecords controller override: Extend the records used for populating the list after the query is processed.

public listExtendRefreshResults()

public listExtendRefreshResults(
    Backend\Widgets\List $host,
    array $result,
    string $definition = null
): array 

listExtendRefreshResults is called when the list is refreshed using AJAX, and should return an array of additional partial updates.

public listExtendSortColumn()

public listExtendSortColumn(
    October\Rain\Database\Builder $query,
    $sortColumn,
    $sortDirection,
    $definition = null
): void

listExtendSortColumn controller override: Customize the sort column and direction to include secondary sorting columns if necessary

public listFilterExtendQuery()

public listFilterExtendQuery(
    October\Rain\Database\Builder $query,
    array $scope
): void

listFilterExtendQuery controller override: Extend the query used for populating the filter options before the default query is processed.

public listFilterExtendScopes()

public listFilterExtendScopes(Backend\Widgets\Filter $host): void 

listFilterExtendScopes is called after the filter scopes are defined.

public listInjectRowClass()

public listInjectRowClass(
    Model $record,
    string $definition = null
): string 

listInjectRowClass returns a CSS class name for a list row ().

public listOverrideColumnValue()

public listOverrideColumnValue(
    Model $record,
    string $columnName,
    string $definition = null
): string 

listOverrideColumnValue replaces a table column value (...)

public listOverrideHeaderValue()

public listOverrideHeaderValue(
    string $columnName,
    string $definition = null
): string 

listOverrideHeaderValue replaces the entire table header contents (...) with custom HTML

public listOverrideRecordUrl()

public listOverrideRecordUrl(
    October\Rain\Database\Model $record,
    string|null $definition = null
): string|array|void 

listOverrideRecordUrl overrides the record url for the given record