PHP Class Encore\Admin\Grid

Afficher le fichier Open project: z-song/laravel-admin Class Usage Examples

Méthodes publiques

Свойство Type Description
$columnNames array All column names of the grid.

Protected Properties

Свойство Type Description
$allowActions boolean Allow actions.
$allowBatchDeletion boolean Allow batch allow.
$builded boolean Mark if the grid is builded.
$builder Closure Grid builder.
$columns Illuminate\Support\Collection Collection of all grid columns.
$exporter Encore\Admin\Grid\Exporter
$filter Encore\Admin\Grid\Filter The grid Filter.
$keyName string Default primary key name.
$model Encore\Admin\Grid\Model The grid data model instance.
$resourcePath Resource path of the grid.
$rows Illuminate\Support\Collection Collection of all data rows.
$rowsCallback Closure Rows callable fucntion.
$variables array All variables in grid view.

Méthodes publiques

Méthode Description
__call ( $method, $arguments ) Dynamically add columns to the grid view.
__construct ( Model $model, Closure $builder ) Create a new grid instance.
__toString ( ) : string Get the string contents of the grid view.
allowActions ( ) : boolean If allow actions.
allowBatchDeletion ( ) : boolean If allow batch delete.
blank ( $label )
build ( ) : void Build the grid.
column ( string $name, string $label = '' ) : Column Add column to Grid.
columns ( array $columns = [] ) : Collection | void Batch add column to grid.
disableActions ( ) Disable all actions.
disableBatchDeletion ( ) Disable batch deletion.
filter ( Closure $callback ) Set the grid filter.
model ( ) : Model Get Grid model.
paginate ( integer $perPage = null ) : void Paginate the grid.
paginator ( ) : mixed Get the grid paginator.
pathOfCreate ( )
render ( ) : string Get the string contents of the grid view.
renderFilter ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View Render the grid filter.
resource ( string $path = null ) : string Get current resource uri.
rows ( Closure $callable = null ) : Collection | void Set grid row callback function.
with ( array $variables = [] ) Add variables to grid view.

Méthodes protégées

Méthode Description
addColumn ( string $column = '', string $label = '' ) : Column Add column to grid.
buildRows ( array $data ) : void Build the grid rows.
setupExporter ( ) : void Setup grid exporter.
setupFilter ( ) : void Setup grid filter.
variables ( ) : array Get all variables will used in grid view.

Method Details

__call() public méthode

Dynamically add columns to the grid view.
public __call ( $method, $arguments )
$method
$arguments

__construct() public méthode

Create a new grid instance.
public __construct ( Model $model, Closure $builder )
$model Illuminate\Database\Eloquent\Model
$builder Closure

__toString() public méthode

Get the string contents of the grid view.
public __toString ( ) : string
Résultat string

addColumn() protected méthode

Add column to grid.
protected addColumn ( string $column = '', string $label = '' ) : Column
$column string
$label string
Résultat Encore\Admin\Grid\Column

allowActions() public méthode

If allow actions.
public allowActions ( ) : boolean
Résultat boolean

allowBatchDeletion() public méthode

If allow batch delete.
public allowBatchDeletion ( ) : boolean
Résultat boolean

blank() public méthode

public blank ( $label )

build() public méthode

Build the grid.
public build ( ) : void
Résultat void

buildRows() protected méthode

Build the grid rows.
protected buildRows ( array $data ) : void
$data array
Résultat void

column() public méthode

Add column to Grid.
public column ( string $name, string $label = '' ) : Column
$name string
$label string
Résultat Encore\Admin\Grid\Column

columns() public méthode

Batch add column to grid.
public columns ( array $columns = [] ) : Collection | void
$columns array
Résultat Illuminate\Support\Collection | void

disableActions() public méthode

Disable all actions.
public disableActions ( )

disableBatchDeletion() public méthode

Disable batch deletion.

filter() public méthode

Set the grid filter.
public filter ( Closure $callback )
$callback Closure

model() public méthode

Get Grid model.
public model ( ) : Model
Résultat Encore\Admin\Grid\Model

paginate() public méthode

Paginate the grid.
public paginate ( integer $perPage = null ) : void
$perPage integer
Résultat void

paginator() public méthode

Get the grid paginator.
public paginator ( ) : mixed
Résultat mixed

pathOfCreate() public méthode

public pathOfCreate ( )

render() public méthode

Get the string contents of the grid view.
public render ( ) : string
Résultat string

renderFilter() public méthode

Render the grid filter.
public renderFilter ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View
Résultat Illuminate\Contracts\View\Factory | Illuminate\View\View

resource() public méthode

Get current resource uri.
public resource ( string $path = null ) : string
$path string
Résultat string

rows() public méthode

Set grid row callback function.
public rows ( Closure $callable = null ) : Collection | void
$callable Closure
Résultat Illuminate\Support\Collection | void

setupExporter() protected méthode

Setup grid exporter.
protected setupExporter ( ) : void
Résultat void

setupFilter() protected méthode

Setup grid filter.
protected setupFilter ( ) : void
Résultat void

variables() protected méthode

Get all variables will used in grid view.
protected variables ( ) : array
Résultat array

with() public méthode

Add variables to grid view.
public with ( array $variables = [] )
$variables array

Property Details

$allowActions protected_oe property

Allow actions.
protected bool $allowActions
Résultat boolean

$allowBatchDeletion protected_oe property

Allow batch allow.
protected bool $allowBatchDeletion
Résultat boolean

$builded protected_oe property

Mark if the grid is builded.
protected bool $builded
Résultat boolean

$builder protected_oe property

Grid builder.
protected Closure $builder
Résultat Closure

$columnNames public_oe property

All column names of the grid.
public array $columnNames
Résultat array

$columns protected_oe property

Collection of all grid columns.
protected Collection,Illuminate\Support $columns
Résultat Illuminate\Support\Collection

$exporter protected_oe property

protected Exporter,Encore\Admin\Grid $exporter
Résultat Encore\Admin\Grid\Exporter

$filter protected_oe property

The grid Filter.
protected Filter,Encore\Admin\Grid $filter
Résultat Encore\Admin\Grid\Filter

$keyName protected_oe property

Default primary key name.
protected string $keyName
Résultat string

$model protected_oe property

The grid data model instance.
protected Model,Encore\Admin\Grid $model
Résultat Encore\Admin\Grid\Model

$resourcePath protected_oe property

Resource path of the grid.
protected $resourcePath

$rows protected_oe property

Collection of all data rows.
protected Collection,Illuminate\Support $rows
Résultat Illuminate\Support\Collection

$rowsCallback protected_oe property

Rows callable fucntion.
protected Closure $rowsCallback
Résultat Closure

$variables protected_oe property

All variables in grid view.
protected array $variables
Résultat array