Column
class Column
Class Column.
Traits
Constants
NAME_SELECTOR |
|
NAME_ACTION |
|
Properties
Filter | $filter | from HasHeader | |
protected array | $headers | from HasHeader | |
static array | $displayers | Displayer for grid column. |
|
static array | $defined | Defined columns. |
|
protected Grid | $grid | ||
string | $name | ||
string | $label | ||
string | $original | ||
protected array | $attributes | Attributes of column. |
|
protected bool | $relation | Relation name. |
|
protected string | $relationColumn | Relation column. |
|
protected | $displayCallbacks | ||
string | $sortable | ||
protected bool | $searchable | ||
string | $style | ||
string | $width | ||
static protected Collection | $originalGridModels | Original grid data. |
|
static protected array | $htmlAttributes | ||
static protected array | $rowAttributes | ||
static protected Model | $model | ||
string | $fixed | ||
string | $editable | ||
string | $template |
Methods
No description
Set model for column.
Set column filter.
Set column as searchable.
Display using display abstract.
Render this column with the given view.
Add column to total-row.
Display field as a loading icon.
Return a human readable format time.
Display column as boolean , ✓
for true, and ✗
for false.
Fill all data to every column.
Passes through all unknown calls to builtin displayer or supported displayer.
获取类属性
Extend column displayer.
Define a column globally.
设置列的原始数据
Get column attributes.
If this column is relation column.
Set relation.
If has display callbacks.
Call all of the "display" callbacks column.
If current column is a defined column.
Use a defined column.
Convert characters to HTML entities recursively.
Find a displayer to display column.
Call Illuminate/Support displayer.
Call Builtin displayer.
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
in
HasHeader at line 28
$this
addHeader(string|Renderable|Htmlable $header)
Add contents to column header.
in
HasHeader at line 44
bindFilterQuery(Model $model)
Add a binding based on filter to the model query.
in
HasHeader at line 56
string
renderHeader()
Render Column header.
in
HasHeader at line 71
getHeader()
No description
in
HasHeader at line 81
protected $this
addFilter($type = null, $formal = null)
Add a filter to column header.
at line 164
__construct(string $name, string $label = '')
No description
at line 175
setGrid(Grid $grid)
Set grid instance for column.
at line 182
Column
editable()
No description
at line 193
setModel($model)
Set model for column.
at line 207
Column
style(string $style = '')
Set style of this column.
at line 220
Column
width(string|int $width)
Set the width of column.
at line 230
Column
sortable()
标识列为可排序
at line 241
Column
fixed(string $position = 'right')
标识列为可fix 显示
at line 254
$this
filter(null $builder = null)
Set column filter.
at line 265
$this
searchable()
Set column as searchable.
at line 288
bindSearchQuery(Model $model)
Bind search query to grid model.
at line 304
$this
display(Closure $callback)
Add a display callback.
at line 319
$this
displayUsing(string $abstract, array $arguments = [])
Display using display abstract.
at line 339
Column
using(array $values, string $default = '')
替换输出, 并指定默认值, 可以用于状态值替换, 使用KV
at line 357
$this
view(string $view)
Render this column with the given view.
at line 370
Column
hide()
当前列存在, 但是数据暂时隐藏掉
at line 383
$this
totalRow(null $display = null)
Add column to total-row.
at line 395
Column
filesize()
Convert file size to a human readable format like 100mb
.
at line 407
Column
gravatar(int $size = 25)
使用 gravatar 来显示头像图
at line 428
$this
loading(array $values = [], array $others = [])
Display field as a loading icon.
at line 445
Column
diffForHumans(null $locale = null)
Return a human readable format time.
at line 463
Column
date(string $format)
Returns a string formatted according to the given format string.
at line 478
Column
bool(array $map = [], bool $default = false)
Display column as boolean , ✓
for true, and ✗
for false.
at line 494
Column
action(string $action)
Display column using a grid row action.
at line 522
Column
dot(array $options = [], string $default = '')
Add a dot
before column text.
at line 543
mixed
fill(array $data)
Fill all data to every column.
at line 575
$this
__call(string $method, array $arguments)
Passes through all unknown calls to builtin displayer or supported displayer.
Allow fluent calls on the Column object.
at line 593
string
__get(string $key)
获取类属性
at line 604
static
extend($name, $displayer)
Extend column displayer.
at line 615
static
define(string $name, mixed $definition)
Define a column globally.
at line 625
static
setOriginalGridModels(Collection $collection)
设置列的原始数据
at line 637
static mixed
getAttributes(string $name, $key = null)
Get column attributes.
at line 655
protected bool
isRelation()
If this column is relation column.
at line 668
$this
setRelation(string $relation, string $relationColumn = null)
Set relation.
at line 681
protected bool
hasDisplayCallbacks()
If has display callbacks.
at line 694
protected mixed
callDisplayCallbacks(mixed $value, int $key)
Call all of the "display" callbacks column.
at line 721
protected Closure
bindOriginalRowModel(Closure $callback, int $key)
Set original grid data to column.
at line 733
protected bool
isDefinedColumn()
If current column is a defined column.
at line 743
protected
useDefinedColumn()
Use a defined column.
at line 778
protected mixed
htmlEntityEncode(array|string $item)
Convert characters to HTML entities recursively.
at line 800
protected Column
resolveDisplayer(string $method, array $arguments)
Find a displayer to display column.
at line 815
protected Column
callSupportDisplayer(string $method, array $arguments)
Call Illuminate/Support displayer.
at line 838
protected Column
callBuiltinDisplayer(string $abstract, array $arguments)
Call Builtin displayer.
at line 40
$this
switch() $$states = [])
No description
at line 40
$this
image(mixed $server, mixed $width, mixed $height)
No description
at line 40
$this
link(mixed $href, mixed $target)
No description
at line 40
$this
progress(mixed $style, mixed $size, mixed $max)
No description
at line 40
$this
downloadable(mixed $server)
No description
at line 40
$this
copyable()
No description
at line 40
$this
qrcode(mixed $formatter, mixed $width, mixed $height)
No description
at line 40
$this
prefix(mixed $prefix, mixed $delimiter)
No description
at line 40
$this
suffix(mixed $suffix, mixed $delimiter)
No description