From 43831357aa322b28f77b2576f9708ebdacaa8596 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 18 Oct 2023 16:13:32 +0200 Subject: [PATCH] feat(devmanual): Contacts menu bulk providers Signed-off-by: Christoph Wurst --- .../groupware/contacts_menu.rst | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/developer_manual/digging_deeper/groupware/contacts_menu.rst b/developer_manual/digging_deeper/groupware/contacts_menu.rst index 47b186997..9a571a74c 100644 --- a/developer_manual/digging_deeper/groupware/contacts_menu.rst +++ b/developer_manual/digging_deeper/groupware/contacts_menu.rst @@ -4,7 +4,7 @@ Contacts Menu Nextcloud shows a *Contacts menu* in the right corner of the header. This menu lists a user's contacts. These contact entries can be extended by apps. -Apps that extend the contacts menu implement an IProvider. The providers ``process`` method is called for every entry show in the contacts menu. +Apps that extend the contacts menu implement an IProvider or IBulkProvider. The ``process`` method of IProvider is called for every entry show in the contacts menu. The ``process`` method of IBulkProvider is called for all entries at once. If it's cheaper to fetch data in one operation, use the IBulkProvider. .. code-block:: php :caption: lib/ContactsMenu/MyProvider.php @@ -22,10 +22,28 @@ Apps that extend the contacts menu implement an IProvider. The providers ``proce } } +Alternatively, as a bulk provider: + +.. code-block:: php + :caption: lib/ContactsMenu/MyBulkProvider.php + + my_app My App - OCA\MyApp\ContactsMenu\LinkActionProvider + OCA\MyApp\ContactsMenu\MyProvider + + OCA\MyApp\ContactsMenu\MyBulkProvider