Skip to content

Commit c52e769

Browse files
authored
Merge pull request #2842 from nextcloud/enh/noid/events
Document existing events
2 parents 9e2afd1 + 0165943 commit c52e769

1 file changed

Lines changed: 169 additions & 11 deletions

File tree

developer_manual/basics/events.rst

Lines changed: 169 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,40 @@ Available Events
168168
Here you find an overview of the public events that can be consumed in apps. See their source files for more details.
169169

170170
``\OCA\DAV\Events\SabrePluginAuthInitEvent``
171-
********************************************************
171+
********************************************
172172

173173
*Available in Nextcloud 20 and later.*
174174

175175
This event is triggered during the setup of the SabreDAV server to allow the registration of additional authentication backends.
176176

177+
``\OCA\FederatedFileSharing\Events\FederatedShareAddedEvent``
178+
*************************************************************
179+
180+
*Available in Nextcloud 20 and later.*
181+
182+
This event is triggered when a federated share is successfully added.
183+
184+
``\OCA\Files\Event\LoadAdditionalScriptsEvent``
185+
***********************************************
186+
187+
*Available in Nextcloud 17 and later.*
188+
189+
This event is triggered when the files app is rendered. It canb e used to add additional scripts to the files app.
190+
177191
``\OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent``
178192
********************************************************
179193

180194
*Available in Nextcloud 20 and later.*
181195

182196
Emitted before the rendering step of the public share page happens. The event holds a flag that specifies if it is the authentication page of a public share.
183197

198+
``\OCA\Viewer\Event\LoadViewer``
199+
********************************
200+
201+
*Available in Nextcloud 17 and later.*
202+
203+
This event is triggered whenever the viewer is loaded and extensions should be loaded.
204+
184205
``\OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent``
185206
*************************************************************
186207

@@ -202,13 +223,131 @@ Emitted when the authentication fails, but only if the login name can be associa
202223

203224
Event emitted by apps whenever there was an interaction with another user or contact.
204225

226+
It is an event that allows apps to notify other components about an interaction between two users. This can be used to build better recommendations and suggestions in user interfaces.
227+
228+
Emitters should add at least one identifier (uid, email, federated cloud ID) of the recipient of the interaction.
229+
230+
``\OCP\DirectEditing\RegisterDirectEditorEvent``
231+
************************************************
232+
233+
*Available in Nextcloud 18 and later.*
234+
235+
Event to allow to register the direct editor.
236+
237+
``\OCP\Files\Events\BeforeFileScannedEvent``
238+
********************************************
239+
240+
*Available in Nextcloud 18 and later.*
241+
242+
``\OCP\Files\Events\BeforeFolderScannedEvent``
243+
**********************************************
244+
245+
*Available in Nextcloud 18 and later.*
246+
247+
``\OCP\Files\Events\FileCacheUpdated``
248+
**************************************
249+
250+
*Available in Nextcloud 18 and later.*
251+
252+
``\OCP\Files\Events\FileScannedEvent``
253+
**************************************
254+
255+
*Available in Nextcloud 18 and later.*
256+
257+
``\OCP\Files\Events\FolderScannedEvent``
258+
****************************************
259+
260+
*Available in Nextcloud 18 and later.*
261+
262+
``\OCP\Files\Events\NodeAddedToCache``
263+
**************************************
264+
265+
*Available in Nextcloud 18 and later.*
266+
267+
``\OCP\Files\Events\NodeRemovedFromCache``
268+
******************************************
269+
270+
*Available in Nextcloud 18 and later.*
271+
272+
``\OCP\Group\Events\BeforeGroupCreatedEvent``
273+
*********************************************
274+
275+
*Available in Nextcloud 18 and later.*
276+
277+
``\OCP\Group\Events\BeforeGroupDeletedEvent``
278+
*********************************************
279+
280+
*Available in Nextcloud 18 and later.*
281+
282+
``\OCP\Group\Events\BeforeUserAddedEvent``
283+
******************************************
284+
285+
*Available in Nextcloud 18 and later.*
286+
287+
``\OCP\Group\Events\BeforeUserRemovedEvent``
288+
********************************************
289+
290+
*Available in Nextcloud 18 and later.*
291+
292+
Deprecated in 20.0.0 - it can't be guaranteed that this event is triggered in all case (e.g. for LDAP users this isn't possible)
293+
294+
``\OCP\Group\Events\GroupCreatedEvent``
295+
***************************************
296+
297+
*Available in Nextcloud 18 and later.*
298+
299+
``\OCP\Group\Events\GroupDeletedEvent``
300+
***************************************
301+
302+
*Available in Nextcloud 18 and later.*
303+
304+
``\OCP\Group\Events\UserAddedEvent``
305+
************************************
306+
307+
*Available in Nextcloud 18 and later.*
308+
309+
``\OCP\Group\Events\UserRemovedEvent``
310+
**************************************
311+
312+
*Available in Nextcloud 18 and later.*
205313
``\OCP\Mail\Events\BeforeMessageSent``
206314
**************************************
207315

208316
*Available in Nextcloud 19 and later.*
209317

210318
Emitted before a system mail is sent. It can be used to alter the message.
211319

320+
``\OCP\Security\CSP\AddContentSecurityPolicyEvent``
321+
***************************************************
322+
323+
*Available in Nextcloud 17 and later.*
324+
325+
Allows to inject something into the default content policy. This is for example useful when you're injecting Javascript code into a view belonging to another controller and cannot modify its Content-Security-Policy itself. Note that the adjustment is only applied to applications that use AppFramework controllers.
326+
327+
WARNING: Using this API incorrectly may make the instance more insecure. Do think twice before adding whitelisting resources. Please do also note that it is not possible to use the `disallowXYZ` functions.
328+
329+
``\OCP\Security\Events\GenerateSecurePasswordEvent``
330+
****************************************************
331+
332+
*Available in Nextcloud 18 and later.*
333+
334+
``\OCP\Security\Events\ValidatePasswordPolicyEvent``
335+
****************************************************
336+
337+
*Available in Nextcloud 18 and later.*
338+
339+
``\OCP\Security\FeaturePolicy\AddFeaturePolicyEvent``
340+
****************************************************
341+
342+
*Available in Nextcloud 17 and later.*
343+
344+
Event that allows to register a feature policy header to a request.
345+
346+
``\OCP\Share\Events\ShareCreatedEvent``
347+
*******************************************
348+
349+
*Available in Nextcloud 18 and later.*
350+
212351
``\OCP\Share\Events\VerifyMountPointEvent``
213352
*******************************************
214353

@@ -224,10 +363,10 @@ Emitted before a user is logged in via remember-me cookies.
224363
``\OCP\User\Events\UserLoggedInWithCookieEvent``
225364
************************************************
226365

227-
Emitted when a user has been succesfully logged in via remember-me cookies.
228-
229366
*Available in Nextcloud 18 and later.*
230367

368+
Emitted when a user has been succesfully logged in via remember-me cookies.
369+
231370
``\OCP\User\Events\BeforePasswordUpdatedEvent``
232371
***********************************************
233372

@@ -261,15 +400,11 @@ Emitted when a new user has been created on the back-end.
261400

262401
*Available in Nextcloud 18 and later.*
263402

264-
Emitted before a user is logged out.
265-
266403
``\OCP\User\Events\UserDeletedEvent``
267404
*************************************
268405

269406
*Available in Nextcloud 18 and later.*
270407

271-
Emitted when a user has been logged out successfully.
272-
273408
``\OCP\User\Events\BeforeUserLoggedInEvent``
274409
********************************************
275410

@@ -280,6 +415,8 @@ Emitted when a user has been logged out successfully.
280415

281416
*Available in Nextcloud 18 and later.*
282417

418+
Emitted before a user is logged out.
419+
283420
``\OCP\User\Events\CreateUserEvent``
284421
************************************
285422

@@ -295,6 +432,11 @@ Emitted when a user has been logged out successfully.
295432

296433
*Available in Nextcloud 18 and later.*
297434

435+
``\OCP\User\Events\UserLiveStatusEvent``
436+
****************************************
437+
438+
*Available in Nextcloud 20 and later.*
439+
298440
``\OCP\User\Events\UserLoggedInEvent``
299441
**************************************
300442

@@ -305,13 +447,29 @@ Emitted when a user has been logged out successfully.
305447

306448
*Available in Nextcloud 18 and later.*
307449

308-
``\OCP\Security\CSP\AddContentSecurityPolicyEvent``
309-
***************************************************
450+
Emitted when a user has been logged out successfully.
310451

311-
*Available in Nextcloud 17 and later.*
452+
``\OCP\WorkflowEngine\LoadSettingsScriptsEvent``
453+
***************************************
454+
455+
*Available in Nextcloud 20 and later.*
456+
457+
Emitted when the workflow engine settings page is loaded.
458+
459+
``\OCP\WorkflowEngine\RegisterChecksEvent``
460+
***************************************
312461

313-
This event is emitted so apps can modify the CSP provided by nextcloud. For example if more domains can be used to connect to. Added in Nextcloud 17.
462+
*Available in Nextcloud 18 and later.*
463+
464+
``\OCP\WorkflowEngine\RegisterEntitiesEvent``
465+
***************************************
466+
467+
*Available in Nextcloud 18 and later.*
468+
469+
``\OCP\WorkflowEngine\RegisterOperationsEvent``
470+
***************************************
314471

472+
*Available in Nextcloud 18 and later.*
315473

316474
Symfony event dispatcher
317475
------------------------

0 commit comments

Comments
 (0)