class GridFieldRefreshButton implements GridField_HTMLProvider, GridField_ActionProvider, GridField_URLHandler (View source)

Adds a "Refresh" button to the bottom or top of a GridField.

Properties

protected string $targetFragment

Fragment to write the button to.

protected QueuedJobService $queuedJobService

Methods

public
__construct(string $targetFragment)

No description

public
array
getHTMLFragments($gridField)

No description

public
array
getActions($gridField)

Refresh is an action button.

public
handleAction(GridField $gridField, $actionName, $arguments, $data)

Handle the refresh action.

public
getURLHandlers($gridField)

Refresh is accessible via the url

public
string
handleCheck()

No description

public
bool
hasActiveJob()

Check the queue for refresh jobs that are not 'done' in one manner or another (e.g. stalled or cancelled)

public
handleRefresh()

Handle the refresh, for both the action button and the URL

public
getQueuedJobService()

No description

public
$this
setQueuedJobService(QueuedJobService $queuedJobService)

No description

Details

__construct(string $targetFragment)

No description

Parameters

string $targetFragment

The HTML fragment to write the button into

array getHTMLFragments($gridField)

No description

Parameters

$gridField

Return Value

array

array getActions($gridField)

Refresh is an action button.

Parameters

$gridField

Return Value

array

with action identifier strings.

handleAction(GridField $gridField, $actionName, $arguments, $data)

Handle the refresh action.

Parameters

GridField $gridField
$actionName
$arguments
$data

getURLHandlers($gridField)

Refresh is accessible via the url

Parameters

$gridField

string handleCheck()

No description

Return Value

string

JSON boolean

See also

hasActiveJob

bool hasActiveJob()

Check the queue for refresh jobs that are not 'done' in one manner or another (e.g. stalled or cancelled)

Return Value

bool

handleRefresh()

Handle the refresh, for both the action button and the URL

QueuedJobService getQueuedJobService()

No description

Return Value

QueuedJobService

$this setQueuedJobService(QueuedJobService $queuedJobService)

No description

Parameters

QueuedJobService $queuedJobService

Return Value

$this