PHP Класс Encore\Admin\Grid

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$columnNames array All column names of the grid.

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
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.

Описание методов

__call() публичный Метод

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

__construct() публичный Метод

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

__toString() публичный Метод

Get the string contents of the grid view.
public __toString ( ) : string
Результат string

addColumn() защищенный Метод

Add column to grid.
protected addColumn ( string $column = '', string $label = '' ) : Column
$column string
$label string
Результат Encore\Admin\Grid\Column

allowActions() публичный Метод

If allow actions.
public allowActions ( ) : boolean
Результат boolean

allowBatchDeletion() публичный Метод

If allow batch delete.
public allowBatchDeletion ( ) : boolean
Результат boolean

blank() публичный Метод

public blank ( $label )

build() публичный Метод

Build the grid.
public build ( ) : void
Результат void

buildRows() защищенный Метод

Build the grid rows.
protected buildRows ( array $data ) : void
$data array
Результат void

column() публичный Метод

Add column to Grid.
public column ( string $name, string $label = '' ) : Column
$name string
$label string
Результат Encore\Admin\Grid\Column

columns() публичный Метод

Batch add column to grid.
public columns ( array $columns = [] ) : Collection | void
$columns array
Результат Illuminate\Support\Collection | void

disableActions() публичный Метод

Disable all actions.
public disableActions ( )

disableBatchDeletion() публичный Метод

Disable batch deletion.

filter() публичный Метод

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

model() публичный Метод

Get Grid model.
public model ( ) : Model
Результат Encore\Admin\Grid\Model

paginate() публичный Метод

Paginate the grid.
public paginate ( integer $perPage = null ) : void
$perPage integer
Результат void

paginator() публичный Метод

Get the grid paginator.
public paginator ( ) : mixed
Результат mixed

pathOfCreate() публичный Метод

public pathOfCreate ( )

render() публичный Метод

Get the string contents of the grid view.
public render ( ) : string
Результат string

renderFilter() публичный Метод

Render the grid filter.
public renderFilter ( ) : Illuminate\Contracts\View\Factory | Illuminate\View\View
Результат Illuminate\Contracts\View\Factory | Illuminate\View\View

resource() публичный Метод

Get current resource uri.
public resource ( string $path = null ) : string
$path string
Результат string

rows() публичный Метод

Set grid row callback function.
public rows ( Closure $callable = null ) : Collection | void
$callable Closure
Результат Illuminate\Support\Collection | void

setupExporter() защищенный Метод

Setup grid exporter.
protected setupExporter ( ) : void
Результат void

setupFilter() защищенный Метод

Setup grid filter.
protected setupFilter ( ) : void
Результат void

variables() защищенный Метод

Get all variables will used in grid view.
protected variables ( ) : array
Результат array

with() публичный Метод

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

Описание свойств

$allowActions защищенное свойство

Allow actions.
protected bool $allowActions
Результат boolean

$allowBatchDeletion защищенное свойство

Allow batch allow.
protected bool $allowBatchDeletion
Результат boolean

$builded защищенное свойство

Mark if the grid is builded.
protected bool $builded
Результат boolean

$builder защищенное свойство

Grid builder.
protected Closure $builder
Результат Closure

$columnNames публичное свойство

All column names of the grid.
public array $columnNames
Результат array

$columns защищенное свойство

Collection of all grid columns.
protected Collection,Illuminate\Support $columns
Результат Illuminate\Support\Collection

$exporter защищенное свойство

protected Exporter,Encore\Admin\Grid $exporter
Результат Encore\Admin\Grid\Exporter

$filter защищенное свойство

The grid Filter.
protected Filter,Encore\Admin\Grid $filter
Результат Encore\Admin\Grid\Filter

$keyName защищенное свойство

Default primary key name.
protected string $keyName
Результат string

$model защищенное свойство

The grid data model instance.
protected Model,Encore\Admin\Grid $model
Результат Encore\Admin\Grid\Model

$resourcePath защищенное свойство

Resource path of the grid.
protected $resourcePath

$rows защищенное свойство

Collection of all data rows.
protected Collection,Illuminate\Support $rows
Результат Illuminate\Support\Collection

$rowsCallback защищенное свойство

Rows callable fucntion.
protected Closure $rowsCallback
Результат Closure

$variables защищенное свойство

All variables in grid view.
protected array $variables
Результат array