aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Files
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-04-26 19:46:13 -0700
committernextcloud-command <nextcloud-command@users.noreply.github.com>2023-04-27 03:20:12 +0000
commit966bc06e8d4a6e010116967792f26e92b0ed9678 (patch)
treec1a0ffc2bd1f0149bffec8e3518706ddcbcb8444 /lib/public/Files
parent63912cc5c5abb6e15c0902b0edb1705bd3aec209 (diff)
downloadnextcloud-server-966bc06e8d4a6e010116967792f26e92b0ed9678.tar.gz
nextcloud-server-966bc06e8d4a6e010116967792f26e92b0ed9678.zip
Create new file/folder labels
Signed-off-by: Christopher Ng <chrng8@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'lib/public/Files')
-rw-r--r--lib/public/Files/Template/TemplateFileCreator.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/public/Files/Template/TemplateFileCreator.php b/lib/public/Files/Template/TemplateFileCreator.php
index 26edf585869..8a396be30e2 100644
--- a/lib/public/Files/Template/TemplateFileCreator.php
+++ b/lib/public/Files/Template/TemplateFileCreator.php
@@ -37,6 +37,10 @@ final class TemplateFileCreator implements \JsonSerializable {
protected $iconClass;
protected $ratio = null;
protected $order = 100;
+ /**
+ * @since 27.0.0
+ */
+ protected string $actionLabel;
/**
* @since 21.0.0
@@ -104,6 +108,21 @@ final class TemplateFileCreator implements \JsonSerializable {
}
/**
+ * @since 27.0.0
+ */
+ public function setActionLabel(string $actionLabel): TemplateFileCreator {
+ $this->actionLabel = $actionLabel;
+ return $this;
+ }
+
+ /**
+ * @since 27.0.0
+ */
+ public function getActionLabel(): string {
+ return $this->actionLabel;
+ }
+
+ /**
* @since 21.0.0
*/
public function jsonSerialize(): array {
@@ -113,7 +132,8 @@ final class TemplateFileCreator implements \JsonSerializable {
'extension' => $this->fileExtension,
'iconClass' => $this->iconClass,
'mimetypes' => $this->mimetypes,
- 'ratio' => $this->ratio
+ 'ratio' => $this->ratio,
+ 'actionLabel' => $this->actionLabel,
];
}
}