final class GridWidget extends GridPlugin

Grid 插件

Traits

PoppyTrait

Properties

protected FilterPlugin $filter from  GridPlugin
protected TablePlugin $table 列组件 from  GridPlugin
protected Interactions $quick 右上角快捷操作 from  GridPlugin
protected Interactions $batch 左下角快捷操作 from  GridPlugin
string read-only $title 标题 from  GridPlugin
protected Query $query 列表模型实例
protected string $exporter

Export driver.

Methods

AuthManager
pyAuth()

get auth

pyTranslator()

get translator

Repository
pyConfig()

Get configuration instance.

DatabaseManager
pyDb()

get db

Kernel
pyConsole()

Get console instance.

Container
pyContainer()

Get IoC Container.

Mailer
pyMailer()

Get mailer instance.

SessionManager|Store
pySession()

Get session instance.

Request
pyRequest()

get request

Redirector
pyRedirector()

get redirector

Factory
pyValidation()

get validation

Dispatcher
pyEvent()

get event

LoggerInterface
pyLogger()

get logger

ResponseFactory
pyResponse()

get response

Filesystem
pyFile()

get file

UrlGenerator
pyUrl()

get url

mixed
pyCache(string $tag = '')

get cache

RedisManager
pyRedis()

get redis

Factory
pyView()

get view

pyPoppy()

get poppy

Ini
pyIni()

Ini Parser

Xml
pyXml()

Ini Parser

pyYaml()

Yaml Parser

bool
queryHas(string $query, string $type)

检测查询类型是否存在

from  UseQuery
string
queryAfter(string $query, string $type)

检测查询类型是否存在

from  UseQuery
__construct(Model|Eloquent|Query|string $model)

Create a new grid instance.

table(Closure $cb)

No description

batch(Closure $cb)

No description

quick(Closure $cb)

No description

filter(Closure $cb)

No description

setTitle(string $title)

设置标题

__get($attr)

No description

array
structQuery()

No description

array
structFilter()

No description

array
structData(Collection $collection, int $total)

填充结构化的数据

model()

获取模型

setLists(string $grid_class)

No description

JsonResponse|RedirectResponse|Response
resp()

返回相应

exporter($exporter)

设置 Grid 的导出方式, 支持 csv, excel , 并可以通过 Extend 进行自定义

array
structPk()

获取PK

getExporter(string $scope)

No description

Details

in PoppyTrait at line 41
protected AuthManager pyAuth()

get auth

Return Value

AuthManager

in PoppyTrait at line 50
protected Translator pyTranslator()

get translator

Return Value

Translator

in PoppyTrait at line 60
protected Repository pyConfig()

Get configuration instance.

Return Value

Repository

in PoppyTrait at line 70
protected DatabaseManager pyDb()

get db

Return Value

DatabaseManager

in PoppyTrait at line 79
protected Kernel pyConsole()

Get console instance.

Return Value

Kernel

in PoppyTrait at line 88
protected Container pyContainer()

Get IoC Container.

Return Value

Container

| Application

in PoppyTrait at line 97
protected Mailer pyMailer()

Get mailer instance.

Return Value

Mailer

in PoppyTrait at line 106
protected SessionManager|Store pySession()

Get session instance.

Return Value

SessionManager|Store

in PoppyTrait at line 115
protected Request pyRequest()

get request

Return Value

Request

in PoppyTrait at line 125
protected Redirector pyRedirector()

get redirector

Return Value

Redirector

in PoppyTrait at line 134
protected Factory pyValidation()

get validation

Return Value

Factory

in PoppyTrait at line 144
protected Dispatcher pyEvent()

get event

Return Value

Dispatcher

in PoppyTrait at line 154
protected LoggerInterface pyLogger()

get logger

Return Value

LoggerInterface

in PoppyTrait at line 164
protected ResponseFactory pyResponse()

get response

Return Value

ResponseFactory

in PoppyTrait at line 174
protected Filesystem pyFile()

get file

Return Value

Filesystem

in PoppyTrait at line 184
protected UrlGenerator pyUrl()

get url

Return Value

UrlGenerator

in PoppyTrait at line 195
protected mixed pyCache(string $tag = '')

get cache

Parameters

string $tag tag

Return Value

mixed

in PoppyTrait at line 209
protected RedisManager pyRedis()

get redis

Return Value

RedisManager

in PoppyTrait at line 218
protected Factory pyView()

get view

Return Value

Factory

in PoppyTrait at line 227
protected Poppy pyPoppy()

get poppy

Return Value

Poppy

in PoppyTrait at line 236
protected Ini pyIni()

Ini Parser

Return Value

Ini

in PoppyTrait at line 245
protected Xml pyXml()

Ini Parser

Return Value

Xml

in PoppyTrait at line 254
protected Yaml pyYaml()

Yaml Parser

Return Value

Yaml

in UseQuery at line 16
protected bool queryHas(string $query, string $type)

检测查询类型是否存在

Parameters

string $query 查询内容
string $type 查询类型

Return Value

bool

in UseQuery at line 31
protected string queryAfter(string $query, string $type)

检测查询类型是否存在

Parameters

string $query 查询内容
string $type 查询类型

Return Value

string

at line 44
__construct(Model|Eloquent|Query|string $model)

Create a new grid instance.

Parameters

Model|Eloquent|Query|string $model

in GridPlugin at line 65
GridPlugin table(Closure $cb)

No description

Parameters

Closure $cb

Return Value

GridPlugin

in GridPlugin at line 71
GridPlugin batch(Closure $cb)

No description

Parameters

Closure $cb

Return Value

GridPlugin

in GridPlugin at line 77
GridPlugin quick(Closure $cb)

No description

Parameters

Closure $cb

Return Value

GridPlugin

in GridPlugin at line 83
GridPlugin filter(Closure $cb)

No description

Parameters

Closure $cb

Return Value

GridPlugin

in GridPlugin at line 95
GridPlugin setTitle(string $title)

设置标题

Parameters

string $title

Return Value

GridPlugin

in GridPlugin at line 101
__get($attr)

No description

Parameters

$attr

in GridPlugin at line 107
protected array structQuery()

No description

Return Value

array

in GridPlugin at line 140
protected array structFilter()

No description

Return Value

array

in GridPlugin at line 154
protected array structData(Collection $collection, int $total)

填充结构化的数据

Parameters

Collection $collection
int $total

Return Value

array

at line 54
Query model()

获取模型

Return Value

Query

at line 63
GridWidget setLists(string $grid_class)

No description

Parameters

string $grid_class

Return Value

GridWidget

at line 94
JsonResponse|RedirectResponse|Response resp()

返回相应

Return Value

JsonResponse|RedirectResponse|Response

at line 128
GridWidget exporter($exporter)

设置 Grid 的导出方式, 支持 csv, excel , 并可以通过 Extend 进行自定义

Parameters

$exporter

Return Value

GridWidget

at line 138
protected array structPk()

获取PK

Return Value

array

at line 149
protected AbstractExporter getExporter(string $scope)

No description

Parameters

string $scope

Return Value

AbstractExporter