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

Public Member Functions

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

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 26 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 36 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 117 of file OpenDocumentService.php.

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

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

◆ closeAllDocuments()

◆ 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 73 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 46 of file OpenDocumentService.php.

Referenced by TYPO3\CMS\Opendocs\Service\OpenDocumentService\closeAllDocuments(), and 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 63 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 105 of file OpenDocumentService.php.

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

Member Data Documentation

◆ $backendUser

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