OpenDocumentRepository
Read onlyYes
FinalYes
Repository for managing open and recent documents for backend users.
Table of Contents
Methods
- addOrUpdateOpenDocument() : void
- Add or update an open document.
- closeAllDocuments() : void
- Close all open documents for a user and change their status to recent.
- closeDocument() : void
- Close an open document and change its status to recent.
- findOpenDocumentsForUser() : array<string, OpenDocument>
- Find all open documents for a user.
- findRecentDocumentsForUser() : array<string, OpenDocument>
- Find all recent documents for a user.
Methods
addOrUpdateOpenDocument()
Add or update an open document.
public
addOrUpdateOpenDocument(OpenDocument $document, BackendUserAuthentication $backendUser) : void
If the document already exists, it updates it. Otherwise, creates a new entry.
Parameters
- $document : OpenDocument
-
Document to add/update
- $backendUser : BackendUserAuthentication
closeAllDocuments()
Close all open documents for a user and change their status to recent.
public
closeAllDocuments(BackendUserAuthentication $backendUser) : void
Parameters
- $backendUser : BackendUserAuthentication
closeDocument()
Close an open document and change its status to recent.
public
closeDocument(string $table, string $uid, BackendUserAuthentication $backendUser) : void
Parameters
- $table : string
-
Table name
- $uid : string
-
Record UID
- $backendUser : BackendUserAuthentication
findOpenDocumentsForUser()
Find all open documents for a user.
public
findOpenDocumentsForUser(BackendUserAuthentication $user) : array<string, OpenDocument>
Parameters
- $user : BackendUserAuthentication
Return values
array<string, OpenDocument> —Indexed by document identifier (table:uid)
findRecentDocumentsForUser()
Find all recent documents for a user.
public
findRecentDocumentsForUser(BackendUserAuthentication $backendUser) : array<string, OpenDocument>
Parameters
- $backendUser : BackendUserAuthentication
Return values
array<string, OpenDocument> —Indexed by document identifier (table:uid), limited to MAX_RECENT_DOCUMENTS