Filterer
class Filterer
Main filterer class
Properties
protected string | $searchQuery | Search query | |
protected array | $sortables | Sortables | |
protected array | $sortableColumns | Sortable columns | |
protected array | $searchableColumns | Searchable columns | |
protected array | $groups | Filter groups | |
protected array | $idColumns | ID columns | |
protected array | $filterColumnCallbacks | Filter column callbacks | |
protected array | $requiredColumns | Required filter columns | |
protected string | $queryKey | Key for searching | |
protected string | $sortKey | Key for sortables | |
protected string | $ignorePrefix | Ignore keys prefixed with _ | |
protected array | $ignoreKeys | Ignore "include" and "page" keys | |
protected string | $baseClassname | Base classname |
Methods
array
parseSortable(string $string)
Parse sortable strings
string
getSearchQuery()
Get search query
array
getSortables()
Get sortables
array
getGroups()
Get filter groups
void
setSearchableColumns(array $columns)
Set searchable columns
void
setSortableColumns(array $columns)
Set sortable columns
void
addSortable(string $column, int $direction)
Add sortable column
void
addFilterColumn(string $column, callable $callback)
Add filter column with a callback
void
addIdColumn(string|array $column)
Add ID column
void
parseRequest(Request $request = null)
Parse HTTP request
getSearchGroup()
Get search filter group
void
checkForRequiredColumns(array $columns)
Check for required columns in filter
void
requireColumn(string $column)
Require specific column in filter
void
setBaseClassname(string $classname)
Set base classname to use against id-filters
Details
at line 115
protected array
parseSortable(string $string)
Parse sortable strings
at line 131
string
getSearchQuery()
Get search query
at line 141
array
getSortables()
Get sortables
at line 151
array
getGroups()
Get filter groups
at line 162
void
setSearchableColumns(array $columns)
Set searchable columns
at line 173
void
setSortableColumns(array $columns)
Set sortable columns
at line 185
void
addSortable(string $column, int $direction)
Add sortable column
at line 201
void
addFilterColumn(string $column, callable $callback)
Add filter column with a callback
at line 212
void
addIdColumn(string|array $column)
Add ID column
at line 231
void
parseRequest(Request $request = null)
Parse HTTP request
at line 279
protected OrGroup
getSearchGroup()
Get search filter group
at line 297
protected void
checkForRequiredColumns(array $columns)
Check for required columns in filter
at line 312
void
requireColumn(string $column)
Require specific column in filter
at line 323
void
setBaseClassname(string $classname)
Set base classname to use against id-filters