‪TYPO3CMS  11.5
TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem:
TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface

Public Member Functions

 __construct (PageRenderer $pageRenderer, UriBuilder $uriBuilder, EventDispatcherInterface $eventDispatcher)
 
bool checkAccess ()
 
string getItem ()
 
string getDropDown ()
 
array getAdditionalAttributes ()
 
bool hasDropDown ()
 
int getIndex ()
 

Protected Member Functions

BackendUserAuthentication getBackendUser ()
 
StandaloneView getFluidTemplateObject (string $filename)
 

Protected Attributes

array $cacheActions = array( )
 
array $optionValues = array( )
 

Detailed Description

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".

Definition at line 34 of file ClearCacheToolbarItem.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::__construct ( PageRenderer  $pageRenderer,
UriBuilder  $uriBuilder,
EventDispatcherInterface  $eventDispatcher 
)

Member Function Documentation

◆ checkAccess()

bool TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::checkAccess ( )

Checks whether the user has access to this toolbar item

Returns
‪bool TRUE if user has access, FALSE if not

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 112 of file ClearCacheToolbarItem.php.

References TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem\getBackendUser().

◆ getAdditionalAttributes()

array TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::getAdditionalAttributes ( )

No additional attributes needed.

Returns
‪array

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 163 of file ClearCacheToolbarItem.php.

◆ getBackendUser()

BackendUserAuthentication TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::getBackendUser ( )
protected

Returns the current BE user.

Returns
‪BackendUserAuthentication

Definition at line 193 of file ClearCacheToolbarItem.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem\__construct(), and TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem\checkAccess().

◆ getDropDown()

string TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::getDropDown ( )

Render drop down

Returns
‪string Drop down HTML

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 151 of file ClearCacheToolbarItem.php.

References TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem\getFluidTemplateObject().

◆ getFluidTemplateObject()

StandaloneView TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::getFluidTemplateObject ( string  $filename)
protected

Returns a new standalone view, shorthand function

Parameters
string$filename‪Which templateFile should be used.
Returns
‪StandaloneView

Definition at line 204 of file ClearCacheToolbarItem.php.

Referenced by TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem\getDropDown(), and TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem\getItem().

◆ getIndex()

int TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::getIndex ( )

Position relative to others

Returns
‪int

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 183 of file ClearCacheToolbarItem.php.

◆ getItem()

string TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::getItem ( )

◆ hasDropDown()

bool TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::hasDropDown ( )

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

Returns
‪bool

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 173 of file ClearCacheToolbarItem.php.

Referenced by TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem\getItem().

Member Data Documentation

◆ $cacheActions

array TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::$cacheActions = array( )
protected

Definition at line 38 of file ClearCacheToolbarItem.php.

◆ $optionValues

array TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::$optionValues = array( )
protected

Definition at line 42 of file ClearCacheToolbarItem.php.