From b39f452ae3ac0ab5279cbe09373f4a8a42071053 Mon Sep 17 00:00:00 2001 From: Johannes Binder Date: Mon, 24 Feb 2025 02:49:13 +0100 Subject: [PATCH] Support breadcrumbs --- docs/docs/getting-started/document-manager.md | 4 +++ src/Contracts/AbstractDocumentManager.php | 7 ++++ src/Contracts/Concerns/HasBreadcrumbs.php | 36 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 src/Contracts/Concerns/HasBreadcrumbs.php diff --git a/docs/docs/getting-started/document-manager.md b/docs/docs/getting-started/document-manager.md index d4ffdd2..52bea4c 100644 --- a/docs/docs/getting-started/document-manager.md +++ b/docs/docs/getting-started/document-manager.md @@ -565,6 +565,10 @@ One of the most important methods on the Document Manager, responsible for const ``` +## Breadcrumbs + +For providing breadcrumbs, which might be supported by the WOPI client, implement the `HasBreadcrumbs` interface. + ### Actions Todo from the docs diff --git a/src/Contracts/AbstractDocumentManager.php b/src/Contracts/AbstractDocumentManager.php index 82452ff..97f1e84 100644 --- a/src/Contracts/AbstractDocumentManager.php +++ b/src/Contracts/AbstractDocumentManager.php @@ -77,6 +77,13 @@ abstract class AbstractDocumentManager 'SupportsRename' => 'supportRename', 'SupportsExtendedLockLength' => 'supportExtendedLockLength', + // Breadcrumbs + 'BreadcrumbBrandName' => 'breadcrumbBrandName', + 'BreadcrumbBrandUrl' => 'breadcrumbBrandUrl', + 'BreadcrumbDocName' => 'breadcrumbDocName', + 'BreadcrumbFolderName' => 'breadcrumbFolderName', + 'BreadcrumbFolderUrl' => 'breadcrumbFolderUrl', + ]; /** diff --git a/src/Contracts/Concerns/HasBreadcrumbs.php b/src/Contracts/Concerns/HasBreadcrumbs.php new file mode 100644 index 0000000..a6fc7ef --- /dev/null +++ b/src/Contracts/Concerns/HasBreadcrumbs.php @@ -0,0 +1,36 @@ +