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

Public Member Functions

 __construct (UriBuilder $uriBuilder, EventDispatcherInterface $eventDispatcher, private readonly BackendViewFactory $backendViewFactory,)
 
 setRequest (ServerRequestInterface $request)
 
 checkAccess ()
 
 getItem ()
 
 getDropDown ()
 
 getAdditionalAttributes ()
 
 hasDropDown ()
 
 getIndex ()
 

Protected Member Functions

 getBackendUser ()
 

Protected Attributes

array $cacheActions = []
 
array $optionValues = []
 

Private Attributes

ServerRequestInterface $request
 

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 manipulated using ModifyClearCacheActionsEvent.

Definition at line 34 of file ClearCacheToolbarItem.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::__construct ( UriBuilder  $uriBuilder,
EventDispatcherInterface  $eventDispatcher,
private readonly BackendViewFactory  $backendViewFactory 
)

Member Function Documentation

◆ checkAccess()

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

Checks whether the user has access to this toolbar item.

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 92 of file ClearCacheToolbarItem.php.

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

◆ getAdditionalAttributes()

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

No additional attributes needed.

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 137 of file ClearCacheToolbarItem.php.

◆ getBackendUser()

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

◆ getDropDown()

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

Render drop-down.

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 127 of file ClearCacheToolbarItem.php.

◆ getIndex()

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

Position relative to others

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 153 of file ClearCacheToolbarItem.php.

◆ getItem()

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

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

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 109 of file ClearCacheToolbarItem.php.

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

◆ hasDropDown()

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.

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 145 of file ClearCacheToolbarItem.php.

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

◆ setRequest()

TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::setRequest ( ServerRequestInterface  $request)

Member Data Documentation

◆ $cacheActions

array TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::$cacheActions = []
protected

Definition at line 36 of file ClearCacheToolbarItem.php.

◆ $optionValues

array TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::$optionValues = []
protected

Definition at line 37 of file ClearCacheToolbarItem.php.

◆ $request

ServerRequestInterface TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem::$request
private