ClearCacheToolbarItem implements ToolbarItemInterface, RequestAwareToolbarItemInterface

Render cache clearing toolbar item.

Adds a dropdown if there are more than one item to clear (usually for admins to render the flush all caches). The dropdown items can be manipulated using ModifyClearCacheActionsEvent.

Attributes
#[Autoconfigure]
$public: true

Table of Contents

Interfaces

ToolbarItemInterface
Interface for classes which extend the backend by adding items to the top toolbar
RequestAwareToolbarItemInterface
Interface for toolbar items that need the ServerRequestInterface Request.

Properties

$cacheActions  : array<string|int, mixed>
$optionValues  : array<string|int, mixed>

Methods

__construct()  : mixed
checkAccess()  : bool
Checks whether the user has access to this toolbar item.
getAdditionalAttributes()  : array<string|int, mixed>
No additional attributes needed.
getDropDown()  : string
Render drop-down.
getIndex()  : int
Position relative to others
getItem()  : string
Render clear cache icon, based on the option if there is more than one icon or just one.
hasDropDown()  : bool
This item has a drop-down, if there is more than one cache action available for the current Backend user.
setRequest()  : void
getBackendUser()  : BackendUserAuthentication

Properties

$cacheActions

protected array<string|int, mixed> $cacheActions = []

$optionValues

protected array<string|int, mixed> $optionValues = []

Methods

checkAccess()

Checks whether the user has access to this toolbar item.

public checkAccess() : bool
Return values
bool

TRUE if user has access, FALSE if not

getAdditionalAttributes()

No additional attributes needed.

public getAdditionalAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

List item HTML attributes

getDropDown()

Render drop-down.

public getDropDown() : string
Return values
string

Drop down HTML

getIndex()

Position relative to others

public getIndex() : int
Return values
int

0 .. 100

getItem()

Render clear cache icon, based on the option if there is more than one icon or just one.

public getItem() : string
Return values
string

Toolbar item HTML

hasDropDown()

This item has a drop-down, if there is more than one cache action available for the current Backend user.

public hasDropDown() : bool
Return values
bool

setRequest()

public setRequest(ServerRequestInterface $request) : void
Parameters
$request : ServerRequestInterface

        
On this page

Search results