Skip to content

Commit

Permalink
Merge pull request #46708 from nextcloud/update-event-docs
Browse files Browse the repository at this point in the history
docs: update docs for ocp events
  • Loading branch information
miaulalala committed Jul 24, 2024
2 parents 7266a9e + 8d3b993 commit fd9de40
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/public/Accounts/UserUpdatedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions lib/public/App/Events/AppDisableEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions lib/public/App/Events/AppEnableEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions lib/public/App/Events/AppUpdateEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 4 additions & 2 deletions lib/public/Collaboration/Reference/RenderReferenceEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
5 changes: 5 additions & 0 deletions lib/public/Preview/BeforePreviewFetchedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand Down

0 comments on commit fd9de40

Please sign in to comment.