table_builder
Table Builder.
Fluid API to define data tables that can be consumed by Vue components.
Table of Contents
Properties
- $actions : array<string|int, mixed>
- $columns : array<string|int, column>
- $filters : array<string|int, mixed>
- $options : array<string|int, mixed>
Methods
- action() : self
- Add an action button.
- build() : table_config
- Build the final configuration DTO.
- column() : self
- Add a column to the table.
- filter() : self
- Add a filter definition.
- make() : self
- Start a new table definition.
- with_options() : self
- Set general table options.
Properties
$actions
private
array<string|int, mixed>
$actions
= []
$columns
private
array<string|int, column>
$columns
= []
$filters
private
array<string|int, mixed>
$filters
= []
$options
private
array<string|int, mixed>
$options
= []
Methods
action()
Add an action button.
public
action(string $key, string $label[, string $icon = '' ][, array<string|int, mixed> $props = [] ]) : self
Parameters
- $key : string
- $label : string
- $icon : string = ''
- $props : array<string|int, mixed> = []
Return values
selfbuild()
Build the final configuration DTO.
public
build() : table_config
Return values
table_configcolumn()
Add a column to the table.
public
column(string $key, string $label[, array<string|int, mixed> $settings = [] ]) : self
Parameters
- $key : string
- $label : string
- $settings : array<string|int, mixed> = []
-
{
Return values
selffilter()
Add a filter definition.
public
filter(string $key, string $label[, string $type = 'select' ][, array<string|int, mixed> $options = [] ]) : self
Parameters
- $key : string
- $label : string
- $type : string = 'select'
-
select, text, date, etc
- $options : array<string|int, mixed> = []
Return values
selfmake()
Start a new table definition.
public
static make() : self
Return values
selfwith_options()
Set general table options.
public
with_options(array<string|int, mixed> $options) : self
Parameters
- $options : array<string|int, mixed>