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 $gridField)

No description

public
array
getActions(GridField $gridField)

Refresh is an action button.

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

Handle the refresh action.

public
array
getURLHandlers(GridField $gridField)

Refresh is accessible via the url

public
string
handleCheck()

No description

public
bool
hasPendingJob()

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 $gridField)

No description

Parameters

GridField $gridField

Return Value

array

array getActions(GridField $gridField)

Refresh is an action button.

Parameters

GridField $gridField

Return Value

array

with action identifier strings.

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

Handle the refresh action.

Parameters

GridField $gridField
string $actionName

Action identifier, see getActions().

array $arguments

Arguments relevant for this

array $data

All form data

array getURLHandlers(GridField $gridField)

Refresh is accessible via the url

Parameters

GridField $gridField

Return Value

array

string handleCheck()

No description

Return Value

string

JSON encoded value for whether there is a job pending or in process to update the report

See also

hasPendingJob

bool hasPendingJob()

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