Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/documentation.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-11-02 13:39:40 +0300
committerJoas Schilling <coding@schilljs.com>2022-11-02 13:39:40 +0300
commit49e6cfffe91e9cbcf68112f3d63bfdef94f687bc (patch)
treef9761b344dae1e8199e8de9416cbb4b9d230e206
parent3f9d58260fabbbf1d7ff5baca344f5b2f340fb9e (diff)
Document the IConditionalWidget dashboard interface
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--developer_manual/digging_deeper/dashboard.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/developer_manual/digging_deeper/dashboard.rst b/developer_manual/digging_deeper/dashboard.rst
index 9eacdf3c3..2072a4df2 100644
--- a/developer_manual/digging_deeper/dashboard.rst
+++ b/developer_manual/digging_deeper/dashboard.rst
@@ -147,6 +147,21 @@ however this method is deprecated and will be removed once Nextcloud 19 is EOL.
}
}
+++++++++++++++++++++++++++++++++
+The IConditionalWidget interface
+++++++++++++++++++++++++++++++++
+
+The IConditionalWidget interface adds the **isEnabled** method to provide the option for a widget to opt-out later.
+While registering the widget the information whether or not a widget should be displayed to the specific user might
+not be available or to complex to calculate up front. In this case the IConditionalWidget allows you to check the
+conditions only when really needed.
+
+.. code-block:: php
+
+ public function isEnabled(): bool {
+ return false;
+ }
+
Provide a user interface
------------------------