PHP Class Encore\Admin\Grid\Column

Show file Open project: z-song/laravel-admin

Protected Properties

Property Type Description
$attributes
$htmlWrappers
$label
$name
$original
$relation
$relationColumn
$sort
$sortable
$valueWrapper

Public Methods

Method Description
__call ( string $method, array $arguments )
__construct ( $name, $label )
badge ( string $style = 'red' ) Wrap value with badge.
button ( string $style = 'default' ) Wrap value as a button.
getLabel ( ) : mixed Get label of the column.
getName ( ) : mixed Get name of this column.
image ( integer $width = 200, integer $height = 200 ) Wrap value as a image.
label ( string $style = 'success' ) Wrap value with label.
link ( $href = '', string $target = '_blank' ) Wrap value as a link.
map ( $data )
progressBar ( string $style = 'primary', string $size = 'sm', integer $max = 100 ) Wrap value as a progressbar.
setRelation ( $relation ) Set relation.
sortable ( ) : Column Mark this column as sortable.
sorter ( ) : string | void Create the column sorter.
value ( Closure $callable ) Add a value wrapper.

Protected Methods

Method Description
formatLabel ( $label ) : mixed Format label.
hasHtmlWrapper ( ) : boolean If column has html wrapper.
hasValueWrapper ( ) : boolean If has a value wrapper.
htmlWrap ( $value ) : mixed Wrap value with wrapper.
htmlWrapper ( $wrapper ) Set html wrapper.
isRelation ( ) : boolean If this column is relation column.
isSorted ( ) : boolean Determine if this column is currently sorted.

Method Details

__call() public method

public __call ( string $method, array $arguments )
$method string
$arguments array

__construct() public method

public __construct ( $name, $label )

badge() public method

Wrap value with badge.
public badge ( string $style = 'red' )
$style string

button() public method

Wrap value as a button.
public button ( string $style = 'default' )
$style string

formatLabel() protected method

Format label.
protected formatLabel ( $label ) : mixed
$label
return mixed

getLabel() public method

Get label of the column.
public getLabel ( ) : mixed
return mixed

getName() public method

Get name of this column.
public getName ( ) : mixed
return mixed

hasHtmlWrapper() protected method

If column has html wrapper.
protected hasHtmlWrapper ( ) : boolean
return boolean

hasValueWrapper() protected method

If has a value wrapper.
protected hasValueWrapper ( ) : boolean
return boolean

htmlWrap() protected method

Wrap value with wrapper.
protected htmlWrap ( $value ) : mixed
$value
return mixed

htmlWrapper() protected method

Set html wrapper.
protected htmlWrapper ( $wrapper )
$wrapper

image() public method

Wrap value as a image.
public image ( integer $width = 200, integer $height = 200 )
$width integer
$height integer

isRelation() protected method

If this column is relation column.
protected isRelation ( ) : boolean
return boolean

isSorted() protected method

Determine if this column is currently sorted.
protected isSorted ( ) : boolean
return boolean

label() public method

Wrap value with label.
public label ( string $style = 'success' )
$style string

map() public method

public map ( $data )

progressBar() public method

Wrap value as a progressbar.
public progressBar ( string $style = 'primary', string $size = 'sm', integer $max = 100 )
$style string
$size string
$max integer

setRelation() public method

Set relation.
public setRelation ( $relation )
$relation

sortable() public method

Mark this column as sortable.
public sortable ( ) : Column
return Column

sorter() public method

Create the column sorter.
public sorter ( ) : string | void
return string | void

value() public method

Add a value wrapper.
public value ( Closure $callable )
$callable Closure

Property Details

$attributes protected property

protected $attributes

$htmlWrappers protected property

protected $htmlWrappers

$label protected property

protected $label

$name protected property

protected $name

$original protected property

protected $original

$relation protected property

protected $relation

$relationColumn protected property

protected $relationColumn

$sort protected property

protected $sort

$sortable protected property

protected $sortable

$valueWrapper protected property

protected $valueWrapper