From 8d3b99349d73ab229490d31b64efb9822ea0c8a6 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Tue, 23 Jul 2024 18:49:26 +0200 Subject: [PATCH] docs: update docs for ocp events Signed-off-by: Daniel Kesselberg --- lib/public/Accounts/UserUpdatedEvent.php | 2 ++ lib/public/App/Events/AppDisableEvent.php | 2 ++ lib/public/App/Events/AppEnableEvent.php | 2 ++ lib/public/App/Events/AppUpdateEvent.php | 2 ++ lib/public/Collaboration/Reference/RenderReferenceEvent.php | 6 ++++-- lib/public/Preview/BeforePreviewFetchedEvent.php | 5 +++++ 6 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/public/Accounts/UserUpdatedEvent.php b/lib/public/Accounts/UserUpdatedEvent.php index 8be8a31b08f83..fe9ea62a302ca 100644 --- a/lib/public/Accounts/UserUpdatedEvent.php +++ b/lib/public/Accounts/UserUpdatedEvent.php @@ -12,6 +12,8 @@ use OCP\IUser; /** + * This event is triggered when the account data of a user was updated. + * * @since 28.0.0 */ class UserUpdatedEvent extends Event { diff --git a/lib/public/App/Events/AppDisableEvent.php b/lib/public/App/Events/AppDisableEvent.php index 00a746636676a..5d16d42785ed7 100644 --- a/lib/public/App/Events/AppDisableEvent.php +++ b/lib/public/App/Events/AppDisableEvent.php @@ -11,6 +11,8 @@ use OCP\EventDispatcher\Event; /** + * This event is triggered when an app is disabled. + * * @since 27.0.0 */ class AppDisableEvent extends Event { diff --git a/lib/public/App/Events/AppEnableEvent.php b/lib/public/App/Events/AppEnableEvent.php index 70d42263d3e43..fe1523d6a834f 100644 --- a/lib/public/App/Events/AppEnableEvent.php +++ b/lib/public/App/Events/AppEnableEvent.php @@ -11,6 +11,8 @@ use OCP\EventDispatcher\Event; /** + * This event is triggered when an app is enabled. + * * @since 27.0.0 */ class AppEnableEvent extends Event { diff --git a/lib/public/App/Events/AppUpdateEvent.php b/lib/public/App/Events/AppUpdateEvent.php index de88d65b68bde..344e7def080e3 100644 --- a/lib/public/App/Events/AppUpdateEvent.php +++ b/lib/public/App/Events/AppUpdateEvent.php @@ -11,6 +11,8 @@ use OCP\EventDispatcher\Event; /** + * This event is triggered when an app is updated. + * * @since 27.0.0 */ class AppUpdateEvent extends Event { diff --git a/lib/public/Collaboration/Reference/RenderReferenceEvent.php b/lib/public/Collaboration/Reference/RenderReferenceEvent.php index 09778a20d2aea..692098dbf60e4 100644 --- a/lib/public/Collaboration/Reference/RenderReferenceEvent.php +++ b/lib/public/Collaboration/Reference/RenderReferenceEvent.php @@ -11,8 +11,10 @@ use OCP\EventDispatcher\Event; /** - * Event that apps can emit on their page rendering to trigger loading of aditional - * scripts for reference widget rendering + * Event emitted when apps might render references like link previews or smart picker widgets. + * + * This can be used to inject scripts for extending that. + * Further details can be found in the :ref:`Reference providers` deep dive. * * @since 25.0.0 */ diff --git a/lib/public/Preview/BeforePreviewFetchedEvent.php b/lib/public/Preview/BeforePreviewFetchedEvent.php index ac3c8c13b55b4..398358d59054f 100644 --- a/lib/public/Preview/BeforePreviewFetchedEvent.php +++ b/lib/public/Preview/BeforePreviewFetchedEvent.php @@ -11,7 +11,12 @@ use OCP\IPreview; /** + * Emitted before a file preview is being fetched. + * + * It can be used to block preview rendering by throwing a ``OCP\Files\NotFoundException`` + * * @since 25.0.1 + * @since 28.0.0 the constructor arguments ``$width``, ``$height``, ``$crop`` and ``$mode`` are no longer nullable. */ class BeforePreviewFetchedEvent extends \OCP\EventDispatcher\Event { /**