Data
trait Data
Properties
| string | $cachePrefix | Cache prefix used in the Data trait scope. |
|
| int|null | $all_data_count | Total count of all data records (before filtering). |
|
| int|null | $filtered_data_count | Count of data records after filtering. |
Methods
Strip modified row internal keys from the collection.
Get all original data without modifications.
Get all data available to the table.
Get original data after filters are applied.
Get data after applying search, filters, and sorting.
Get selected original data without modifications.
Get selected rows data.
Get a single row by its ID.
Get data for the current page.
Parse and cache the initial data.
Process a collection of rows.
Transform a single row.
Get all column metadata in a single pass over getFreshColumns().
Export the current table data to clipboard (CSV/TSV).
Details
at line 32
Collection
stripModifiedRows(Collection $collection)
Strip modified row internal keys from the collection.
Removes keys ending with '_original' and potentially restores original values.
at line 55
Collection
getAllOriginalData()
Get all original data without modifications.
at line 67
Collection
getAllData()
Get all data available to the table.
Fetches from model/database if configured, or returns cached data.
at line 83
Collection
getAfterFiltersOriginalData()
Get original data after filters are applied.
at line 93
Collection
getAfterFiltersData()
Get data after applying search, filters, and sorting.
at line 133
Collection
getSelectedOriginalData()
Get selected original data without modifications.
at line 143
Collection
getSelectedData()
Get selected rows data.
at line 166
mixed|null
getRowByID(mixed $id)
Get a single row by its ID.
at line 188
Collection
getCurrentPageData()
Get data for the current page.
at line 210
void
parseData()
Parse and cache the initial data.
Clears existing cache, resets pagination, and re-processes data from source. Dispatches events based on data availability.
at line 236
Collection
processCollection(Collection $collection)
Process a collection of rows.
Applies transformations (custom data, links, toggles) to each row.
at line 274
array
transformRow(mixed $row, array $customData, array $linkColumns, array $toggleColumns, array $cardTitleCallbacks = [])
Transform a single row.
at line 375
array
getColumnMetadata()
Get all column metadata in a single pass over getFreshColumns().
Consolidates custom data, link columns, toggle columns, and card title callbacks to avoid iterating the column definitions multiple times.
at line 428
void
exportToClipboard(Collection $collection, bool $tabs = true)
Export the current table data to clipboard (CSV/TSV).