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 columns with custom data closure.
Get columns configured as links.
Get columns with toggle functionality.
Export the current table data to clipboard (CSV/TSV).
Details
at line 64
Collection
stripModifiedRows(Collection $collection)
Strip modified row internal keys from the collection.
Removes keys ending with '_original' and potentially restores original values.
at line 90
Collection
getAllOriginalData()
Get all original data without modifications.
at line 109
Collection
getAllData()
Get all data available to the table.
Fetches from model/database if configured, or returns cached data.
at line 132
Collection
getAfterFiltersOriginalData()
Get original data after filters are applied.
at line 147
Collection
getAfterFiltersData()
Get data after applying search, filters, and sorting.
at line 189
Collection
getSelectedOriginalData()
Get selected original data without modifications.
at line 199
Collection
getSelectedData()
Get selected rows data.
at line 228
mixed|null
getRowByID(mixed $id)
Get a single row by its ID.
at line 265
Collection
getCurrentPageData()
Get data for the current page.
at line 285
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 311
Collection
processCollection(Collection $collection)
Process a collection of rows.
Applies transformations (custom data, links, toggles) to each row.
at line 382
array
transformRow(mixed $row, array $customData, array $linkColumns, array $toggleColumns)
Transform a single row.
at line 478
array
getCustomData()
Get columns with custom data closure.
at line 496
array
getLinkColumns()
Get columns configured as links.
at line 516
array
getToggleColumns()
Get columns with toggle functionality.
at line 542
void
exportToClipboard(Collection $collection, bool $tabs = true)
Export the current table data to clipboard (CSV/TSV).