final class TableWidget extends TablePlugin

deprecated 4.0-dev

Constants

NAME_BATCH

NAME_COLS

NAME_ACTION

NAME_SORT

Properties

bool $enableSelection 是否启用选择项 from  TablePlugin
array $pagesizeOptions 分页选项 from  TablePlugin
protected int $pagesize 分页数 from  TablePlugin
Collection|Column[] $columns 所有的列数据 from  TablePlugin

Methods

__construct()

No description

add(string $name, string $label = '', bool $after = true)

添加列到组件, 最后的 name 形式是 name 或者 relation.name

action(Closure $closure, string $title = '操作') deprecated

添加列操作, 这种列操作的写法无法在列表中写两列, 使用一下这种方式编写 $table->add('handle', '操作')->asAction(function(){})

Collection
visibleCols()

可见的列实例

array
visibleColsName()

可见列名称

string
__get(string $name)

获取属性

enableSelection()

是否开启选择器

array
struct()

返回结构化的数据

Details

in TablePlugin at line 50
__construct()

No description

in TablePlugin at line 62
Column add(string $name, string $label = '', bool $after = true)

添加列到组件, 最后的 name 形式是 name 或者 relation.name

Parameters

string $name
string $label
bool $after 添加位置

Return Value

Column

in TablePlugin at line 94
Column action(Closure $closure, string $title = '操作') deprecated

deprecated 4.0-dev

添加列操作, 这种列操作的写法无法在列表中写两列, 使用一下这种方式编写 $table->add('handle', '操作')->asAction(function(){})

Parameters

Closure $closure
string $title

Return Value

Column

in TablePlugin at line 103
Collection visibleCols()

可见的列实例

Return Value

Collection

in TablePlugin at line 120
array visibleColsName()

可见列名称

Return Value

array

in TablePlugin at line 131
string __get(string $name)

获取属性

Parameters

string $name 属性名称

Return Value

string

in TablePlugin at line 140
TablePlugin enableSelection()

是否开启选择器

Return Value

TablePlugin

in TablePlugin at line 150
array struct()

返回结构化的数据

Return Value

array