DocumentsTable
extends DashTable
in package
Table of Contents
Properties
- $collectionName : mixed
- $columns : mixed
- $currentPage : mixed
- $enableFilters : mixed
- $enablePagination : mixed
- $enableSearch : mixed
- $filters : mixed
- $items : mixed
- $perPage : mixed
- $searchQuery : mixed
- $totalItems : mixed
- $totalPages : mixed
Methods
- __construct() : mixed
- display() : mixed
- renderFilters() : mixed
- renderSearchAndPagination() : mixed
- resolveFilters() : mixed
- resolvePagination() : mixed
- resolveSearch() : mixed
- fetchItems() : mixed
- generateColumns() : mixed
- buildFilterString() : string
- Builds filter string from filter array
- buildSearchParameters() : array<string|int, mixed>
- Builds search parameters for the TypeSense query
- getArrayPreview() : string
- Returns a preview string for an array.
Properties
$collectionName
protected
mixed
$collectionName
$columns
protected
mixed
$columns
= []
$currentPage
protected
mixed
$currentPage
= 1
$enableFilters
protected
mixed
$enableFilters
= false
$enablePagination
protected
mixed
$enablePagination
= false
$enableSearch
protected
mixed
$enableSearch
= false
$filters
protected
mixed
$filters
= []
$items
protected
mixed
$items
= []
$perPage
protected
mixed
$perPage
= 25
$searchQuery
protected
mixed
$searchQuery
= ''
$totalItems
protected
mixed
$totalItems
= 0
$totalPages
protected
mixed
$totalPages
= 1
Methods
__construct()
public
__construct(string $collectionName[, mixed $enableSearch = true ][, mixed $enablePagination = true ][, mixed $enableFilters = true ]) : mixed
Parameters
- $collectionName : string
- $enableSearch : mixed = true
- $enablePagination : mixed = true
- $enableFilters : mixed = true
display()
public
display() : mixed
renderFilters()
public
renderFilters() : mixed
renderSearchAndPagination()
public
renderSearchAndPagination() : mixed
resolveFilters()
public
resolveFilters() : mixed
resolvePagination()
public
resolvePagination() : mixed
resolveSearch()
public
resolveSearch() : mixed
fetchItems()
protected
fetchItems() : mixed
generateColumns()
protected
generateColumns(array<string|int, mixed> $documents) : mixed
Parameters
- $documents : array<string|int, mixed>
buildFilterString()
Builds filter string from filter array
private
buildFilterString() : string
Return values
stringbuildSearchParameters()
Builds search parameters for the TypeSense query
private
buildSearchParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>getArrayPreview()
Returns a preview string for an array.
private
getArrayPreview(array<string|int, mixed> $array) : string
If the array has one scalar value, returns it. If the array has more values, returns the first three key-value pairs. If a value is an array, replaces it with "[...]".
Parameters
- $array : array<string|int, mixed>
-
The array to preview.
Return values
string —The preview string.