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

Public Member Functions

 __construct (OpenDocumentService $documentService=null)
 
bool checkAccess ()
 
string getItem ()
 
bool hasDropDown ()
 
string getDropDown ()
 
array getAdditionalAttributes ()
 
int getIndex ()
 
 updateNumberOfOpenDocsHook (&$params)
 

Protected Member Functions

array getMenuEntries (array $documents)
 
array getMenuEntry (array $document, string $identifier)
 
StandaloneView getFluidTemplateObject (string $filename)
 
BackendUserAuthentication getBackendUser ()
 

Protected Attributes

array $recentDocs = array( )
 
OpenDocumentService $documentService
 

Detailed Description

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

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

Definition at line 30 of file OpendocsToolbarItem.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::__construct ( OpenDocumentService  $documentService = null)

Set up dependencies

Parameters
OpenDocumentService | null$documentService

Definition at line 45 of file OpendocsToolbarItem.php.

References TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem\$documentService.

Member Function Documentation

◆ checkAccess()

bool TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::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 55 of file OpendocsToolbarItem.php.

References TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem\getBackendUser(), and TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfig().

◆ getAdditionalAttributes()

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

No additional attributes

Returns
‪array List of attributes

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 104 of file OpendocsToolbarItem.php.

◆ getBackendUser()

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

Definition at line 216 of file OpendocsToolbarItem.php.

References $GLOBALS.

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

◆ getDropDown()

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

◆ getFluidTemplateObject()

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

Returns a new standalone view, shorthand function

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

Definition at line 198 of file OpendocsToolbarItem.php.

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

◆ getIndex()

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

Position relative to others

Returns
‪int

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 114 of file OpendocsToolbarItem.php.

◆ getItem()

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

◆ getMenuEntries()

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

Get menu entries for all eligible records

Parameters
array$documents
Returns
‪array

Definition at line 140 of file OpendocsToolbarItem.php.

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

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

◆ getMenuEntry()

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

Returns the data for a recent or open document

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

Definition at line 162 of file OpendocsToolbarItem.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL().

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

◆ hasDropDown()

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

This item has a drop down

Returns
‪bool

Implements TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface.

Definition at line 77 of file OpendocsToolbarItem.php.

◆ updateNumberOfOpenDocsHook()

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

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

Parameters
array$params

Definition at line 125 of file OpendocsToolbarItem.php.

Member Data Documentation

◆ $documentService

OpenDocumentService TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::$documentService
protected

◆ $recentDocs

array TYPO3\CMS\Opendocs\Backend\ToolbarItems\OpendocsToolbarItem::$recentDocs = array( )
protected

Definition at line 34 of file OpendocsToolbarItem.php.