GridColumn
in package
Class GridColumn.
Describe GridData column.
Tags
Table of Contents
Properties
- $attributes : array<string|int, mixed>
Methods
- __construct() : mixed
- action() : $this
- alignCenter() : $this
- Align column content to center.
- alignLeft() : $this
- Align column content to left.
- alignRight() : $this
- Align column content to right.
- asDateTime() : $this
- Render as Date Time cell.
- asEmail() : $this
- Render as Email cell with a mailto hyperlink.
- asFeaturedUser() : $this
- asHtml() : self
- asIcon() : static
- asIconStatus() : static
- asId() : static
- asNumber() : $this
- Set frontend render as number format.
- asNumeral() : $this
- asPreviewUrl() : self
- asPricing() : static
- asToggle() : $this
- Render as a toggle active cell.
- asToggleActive() : $this
- Render as a toggle active cell.
- asToggleDefault() : $this
- Render as a toggle active cell.
- asYesNo() : $this
- Render as YesNoCell.
- asYesNoIcon() : static
- editable() : $this
- Set column is editable.
- flex() : $this
- Set the column flex weight.
- header() : $this
- Set column header title.
- hint() : static
- linkTo() : $this
- Add link ref to a field name in the data grid.
- minWidth() : static
- polling() : self
- reload() : $this
- renderAs() : $this
- Set align client.
- setAttribute() : $this
- Set attribute.
- sortable() : $this
- Add sortable to the grid column.
- sortableField() : $this
- tagName() : static
- target() : static
- toArray() : array<string, mixed>
- tooltip() : static
- truncateLines() : $this
- Column should be multiple line with specific lines.
- variant() : static
- width() : $this
- Set column width in pixel.
Properties
$attributes
private
array<string|int, mixed>
$attributes
= []
<string,string|int>
Methods
__construct()
public
__construct(string $field) : mixed
Parameters
- $field : string
action()
public
action(string $action) : $this
Parameters
- $action : string
Return values
$thisalignCenter()
Align column content to center.
public
alignCenter() : $this
Return values
$thisalignLeft()
Align column content to left.
public
alignLeft() : $this
Return values
$thisalignRight()
Align column content to right.
public
alignRight() : $this
Return values
$thisasDateTime()
Render as Date Time cell.
public
asDateTime([string $format = 'medium' ][, bool $showTime = true ]) : $this
Parameters
- $format : string = 'medium'
- $showTime : bool = true
Return values
$thisasEmail()
Render as Email cell with a mailto hyperlink.
public
asEmail(string $target) : $this
Parameters
- $target : string
Return values
$thisasFeaturedUser()
public
asFeaturedUser() : $this
Return values
$thisasHtml()
public
asHtml() : self
Return values
selfasIcon()
public
asIcon() : static
Return values
staticasIconStatus()
public
asIconStatus([array<string, mixed>|null $config = null ][, array<string|int, mixed>|null $polling = null ]) : static
Parameters
- $config : array<string, mixed>|null = null
- $polling : array<string|int, mixed>|null = null
Return values
staticasId()
public
asId() : static
Return values
staticasNumber()
Set frontend render as number format.
public
asNumber() : $this
Return values
$thisasNumeral()
public
asNumeral(string $format) : $this
Parameters
- $format : string
Tags
Return values
$thisasPreviewUrl()
public
asPreviewUrl() : self
Return values
selfasPricing()
public
asPricing() : static
Return values
staticasToggle()
Render as a toggle active cell.
public
asToggle(string $action[, bool $reload = false ]) : $this
Parameters
- $action : string
- $reload : bool = false
Return values
$thisasToggleActive()
Render as a toggle active cell.
public
asToggleActive() : $this
Return values
$thisasToggleDefault()
Render as a toggle active cell.
public
asToggleDefault() : $this
Return values
$thisasYesNo()
Render as YesNoCell.
public
asYesNo() : $this
Return values
$thisasYesNoIcon()
public
asYesNoIcon() : static
Return values
staticeditable()
Set column is editable.
public
editable() : $this
Return values
$thisflex()
Set the column flex weight.
public
flex([mixed $flex = 1 ][, mixed $minWidth = 200 ]) : $this
Parameters
- $flex : mixed = 1
-
Example: 1
- $minWidth : mixed = 200
-
, Example 200
Return values
$thisheader()
Set column header title.
public
header(string $header) : $this
Parameters
- $header : string
Return values
$thishint()
public
hint(string $key[, string|null $default = null ]) : static
Parameters
- $key : string
- $default : string|null = null
Return values
staticlinkTo()
Add link ref to a field name in the data grid.
public
linkTo(string $field) : $this
Parameters
- $field : string
Return values
$thisminWidth()
public
minWidth(int $minWidth) : static
Parameters
- $minWidth : int
Return values
staticpolling()
public
polling(array<string|int, mixed> $config) : self
Parameters
- $config : array<string|int, mixed>
Return values
selfreload()
public
reload([bool $value = true ]) : $this
Parameters
- $value : bool = true
Return values
$thisrenderAs()
Set align client.
public
renderAs(string $renderCell) : $this
Parameters
- $renderCell : string
Return values
$thissetAttribute()
Set attribute.
public
setAttribute(string $name, mixed $value) : $this
Parameters
- $name : string
- $value : mixed
Return values
$thissortable()
Add sortable to the grid column.
public
sortable([bool $sortable = true ]) : $this
Parameters
- $sortable : bool = true
Return values
$thissortableField()
public
sortableField(string $name) : $this
Parameters
- $name : string
Return values
$thistagName()
public
tagName(string $tagName) : static
Parameters
- $tagName : string
Return values
statictarget()
public
target(string $target) : static
Parameters
- $target : string
Return values
statictoArray()
public
toArray() : array<string, mixed>
Return values
array<string, mixed>tooltip()
public
tooltip(string $tooltip) : static
Parameters
- $tooltip : string
Return values
statictruncateLines()
Column should be multiple line with specific lines.
public
truncateLines([int $lines = 2 ]) : $this
Parameters
- $lines : int = 2
Return values
$thisvariant()
public
variant(string $variant) : static
Parameters
- $variant : string
Return values
staticwidth()
Set column width in pixel.
public
width(int $width[, int $minWidth = null ]) : $this
Parameters
- $width : int
-
Example: 1
- $minWidth : int = null
-
Example: 1