summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-04-02 17:22:42 +0200
committerRobin Appelman <robin@icewind.nl>2020-04-03 15:44:53 +0200
commit857957b45e563b9ac789adec0374d486c71a96ed (patch)
treed3cc2627234dfcb87abe55a502ee9687bdbb9531 /apps/files_external/lib
parentbc6a5ef5c4431ca662424dbd1125e65e74b27fa8 (diff)
downloadnextcloud-server-857957b45e563b9ac789adec0374d486c71a96ed.tar.gz
nextcloud-server-857957b45e563b9ac789adec0374d486c71a96ed.zip
allow setting tooltips for external storage config options
allows explaining non-obvious config options a bit more Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/Lib/DefinitionParameter.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/DefinitionParameter.php b/apps/files_external/lib/Lib/DefinitionParameter.php
index 7250a77e6c1..2e1ce7fb1dd 100644
--- a/apps/files_external/lib/Lib/DefinitionParameter.php
+++ b/apps/files_external/lib/Lib/DefinitionParameter.php
@@ -48,6 +48,9 @@ class DefinitionParameter implements \JsonSerializable {
/** @var string human-readable parameter text */
private $text;
+ /** @var string human-readable parameter tooltip */
+ private $tooltip = '';
+
/** @var int value type, see self::VALUE_* constants */
private $type = self::VALUE_TEXT;
@@ -147,6 +150,22 @@ class DefinitionParameter implements \JsonSerializable {
}
/**
+ * @return string
+ */
+ public function getTooltip(): string {
+ return $this->tooltip;
+ }
+
+ /**
+ * @param string $tooltip
+ * @return self
+ */
+ public function setTooltip(string $tooltip) {
+ $this->tooltip = $tooltip;
+ return $this;
+ }
+
+ /**
* Serialize into JSON for client-side JS
*
* @return string
@@ -155,7 +174,8 @@ class DefinitionParameter implements \JsonSerializable {
return [
'value' => $this->getText(),
'flags' => $this->getFlags(),
- 'type' => $this->getType()
+ 'type' => $this->getType(),
+ 'tooltip' => $this->getTooltip(),
];
}