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

Public Member Functions

 __construct (private readonly OpenDocumentService $documentService, private readonly UriBuilder $uriBuilder, private readonly BackendViewFactory $backendViewFactory,)
 
 setRequest (ServerRequestInterface $request)
 
 checkAccess ()
 
 getItem ()
 
 hasDropDown ()
 
 getDropDown ()
 
 getAdditionalAttributes ()
 
 getIndex ()
 
 updateNumberOfOpenDocsHook (array &$params)
 

Protected Member Functions

 getMenuEntries (array $documents)
 
array getMenuEntry (array $document, string $identifier)
 
 getBackendUser ()
 

Private Attributes

ServerRequestInterface $request
 

Detailed Description

Main functionality to render a list of all open documents in the top bar of the Backend.

This class is a specific hook implementation and is not part of the TYPO3's Core API.

Definition at line 36 of file OpendocsToolbarItem.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::__construct ( private readonly OpenDocumentService  $documentService,
private readonly UriBuilder  $uriBuilder,
private readonly BackendViewFactory  $backendViewFactory 
)

Definition at line 40 of file OpendocsToolbarItem.php.

Member Function Documentation

◆ checkAccess()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::checkAccess ( )

Checks whether the user has access to this toolbar item.

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 54 of file OpendocsToolbarItem.php.

References TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem\getBackendUser().

◆ getAdditionalAttributes()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::getAdditionalAttributes ( )

No additional attributes

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 93 of file OpendocsToolbarItem.php.

◆ getBackendUser()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::getBackendUser ( )
protected

◆ getDropDown()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::getDropDown ( )

◆ getIndex()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::getIndex ( )

Position relative to others

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 101 of file OpendocsToolbarItem.php.

◆ getItem()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::getItem ( )

Render toolbar icon via Fluid

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 62 of file OpendocsToolbarItem.php.

◆ getMenuEntries()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::getMenuEntries ( array  $documents)
protected

◆ getMenuEntry()

array TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::getMenuEntry ( array  $document,
string  $identifier 
)
protected

Returns the data for a recent or open document

Returns
‪array The data of a recent or closed document, or empty array if no record was found (e.g. deleted)

Definition at line 139 of file OpendocsToolbarItem.php.

References TYPO3\CMS\Webhooks\Message\$identifier, TYPO3\CMS\Webhooks\Message\$record, and TYPO3\CMS\Webhooks\Message\$uid.

Referenced by TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem\getMenuEntries().

◆ hasDropDown()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::hasDropDown ( )

This item has a drop-down.

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 71 of file OpendocsToolbarItem.php.

◆ setRequest()

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

◆ updateNumberOfOpenDocsHook()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::updateNumberOfOpenDocsHook ( array &  $params)

Called as a hook in \TYPO3\CMS\Backend\Utility\BackendUtility::getUpdateSignalDetails, calls a JS function to change the number of opened documents.

Definition at line 110 of file OpendocsToolbarItem.php.

References TYPO3\CMS\Backend\Domain\Model\Element\ImmediateActionElement\dispatchCustomEvent().

Member Data Documentation

◆ $request

ServerRequestInterface TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::$request
private