ClearCacheToolbarItem implements ToolbarItemInterface

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 extended via a hook named "cacheActions".

Table of Contents

Interfaces

ToolbarItemInterface
Interface for classes which extend the backend by adding items to the top toolbar

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.
getBackendUser()  : BackendUserAuthentication
Returns the current BE user.
getFluidTemplateObject()  : StandaloneView
Returns a new standalone view, shorthand function

Properties

$cacheActions

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

$optionValues

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

Methods

__construct()

public __construct(PageRenderer $pageRenderer, UriBuilder $uriBuilder, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
$pageRenderer : PageRenderer
$uriBuilder : UriBuilder
$eventDispatcher : EventDispatcherInterface
Tags
throws
UnexpectedValueException

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>

getDropDown()

Render drop down

public getDropDown() : string
Return values
string

Drop down HTML

getIndex()

Position relative to others

public getIndex() : int
Return values
int

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

Icon 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

getFluidTemplateObject()

Returns a new standalone view, shorthand function

protected getFluidTemplateObject(string $filename) : StandaloneView
Parameters
$filename : string

Which templateFile should be used.

Return values
StandaloneView

        
On this page

Search results