MIDDAG for Moodle

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

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
self

build()

Build the final configuration DTO.

public build() : table_config
Return values
table_config

column()

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
self

filter()

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
self

make()

Start a new table definition.

public static make() : self
Return values
self

with_options()

Set general table options.

public with_options(array<string|int, mixed> $options) : self
Parameters
$options : array<string|int, mixed>
Return values
self

        
On this page

Search results