‪TYPO3CMS  9.5
TYPO3\CMS\Opendocs\Service\OpenDocumentService Class Reference

Public Member Functions

 __construct (BackendUserAuthentication $backendUser=null)
 
array getOpenDocuments ()
 
array getRecentDocuments ()
 
 closeDocument (string $identifier)
 

Protected Member Functions

 storeOpenDocuments (array $openDocuments)
 
 addToRecentDocuments (string $identifier, array $document)
 

Protected Attributes

BackendUserAuthentication $backendUser
 

Detailed Description

Access to open and recent documents

helper class

Definition at line 24 of file OpenDocumentService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Opendocs\Service\OpenDocumentService::__construct ( BackendUserAuthentication  $backendUser = null)

Constructor

Parameters
BackendUserAuthentication | null$backendUser

Definition at line 34 of file OpenDocumentService.php.

References TYPO3\CMS\Opendocs\Service\OpenDocumentService\$backendUser, and $GLOBALS.

Member Function Documentation

◆ addToRecentDocuments()

TYPO3\CMS\Opendocs\Service\OpenDocumentService::addToRecentDocuments ( string  $identifier,
array  $document 
)
protected

Add a document to the list of recent documents

Parameters
string$identifier‪identifier of the document
array$document‪document data

Definition at line 103 of file OpenDocumentService.php.

References TYPO3\CMS\Opendocs\Service\OpenDocumentService\getRecentDocuments().

Referenced by TYPO3\CMS\Opendocs\Service\OpenDocumentService\closeDocument().

◆ closeDocument()

TYPO3\CMS\Opendocs\Service\OpenDocumentService::closeDocument ( string  $identifier)

Close a document and add it to the list of recent documents

Parameters
string$identifier‪a document identifier (MD5 hash)

Definition at line 71 of file OpenDocumentService.php.

References TYPO3\CMS\Opendocs\Service\OpenDocumentService\addToRecentDocuments(), TYPO3\CMS\Opendocs\Service\OpenDocumentService\getOpenDocuments(), and TYPO3\CMS\Opendocs\Service\OpenDocumentService\storeOpenDocuments().

◆ getOpenDocuments()

array TYPO3\CMS\Opendocs\Service\OpenDocumentService::getOpenDocuments ( )

Get the list of open documents for the current user

Returns
‪array

Definition at line 44 of file OpenDocumentService.php.

Referenced by TYPO3\CMS\Opendocs\Service\OpenDocumentService\closeDocument().

◆ getRecentDocuments()

array TYPO3\CMS\Opendocs\Service\OpenDocumentService::getRecentDocuments ( )

Get the list of recent documents for the current user

Returns
‪array

Definition at line 61 of file OpenDocumentService.php.

Referenced by TYPO3\CMS\Opendocs\Service\OpenDocumentService\addToRecentDocuments().

◆ storeOpenDocuments()

TYPO3\CMS\Opendocs\Service\OpenDocumentService::storeOpenDocuments ( array  $openDocuments)
protected

Store a list of open documents

Parameters
array$openDocuments

Definition at line 91 of file OpenDocumentService.php.

Referenced by TYPO3\CMS\Opendocs\Service\OpenDocumentService\closeDocument().

Member Data Documentation

◆ $backendUser

BackendUserAuthentication TYPO3\CMS\Opendocs\Service\OpenDocumentService::$backendUser
protected