diff options
author | Christopher Ng <chrng8@gmail.com> | 2024-03-20 12:49:58 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2024-03-20 15:50:52 -0700 |
commit | 66e77d41c87e75447ac10090e1e7629e7b221cac (patch) | |
tree | d440ba9d43b544b3abcdaca3a1b02f3815b431b9 /lib/public | |
parent | c451829579de14fbae33b9f59075a025471066c6 (diff) | |
download | nextcloud-server-66e77d41c87e75447ac10090e1e7629e7b221cac.tar.gz nextcloud-server-66e77d41c87e75447ac10090e1e7629e7b221cac.zip |
feat: Add iconSvgInline to TemplateFileCreator
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Files/Template/TemplateFileCreator.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/public/Files/Template/TemplateFileCreator.php b/lib/public/Files/Template/TemplateFileCreator.php index 0c2f7a115a2..40a68461bc1 100644 --- a/lib/public/Files/Template/TemplateFileCreator.php +++ b/lib/public/Files/Template/TemplateFileCreator.php @@ -37,6 +37,8 @@ final class TemplateFileCreator implements \JsonSerializable { protected $fileExtension; /** @var ?string $iconClass */ protected $iconClass; + /** @var ?string $iconSvgInline */ + protected $iconSvgInline; /** @var ?float $ratio */ protected $ratio = null; protected $order = 100; @@ -66,6 +68,7 @@ final class TemplateFileCreator implements \JsonSerializable { /** * @since 21.0.0 + * @deprecated 29.0.0 */ public function setIconClass(string $iconClass): TemplateFileCreator { $this->iconClass = $iconClass; @@ -73,6 +76,14 @@ final class TemplateFileCreator implements \JsonSerializable { } /** + * @since 29.0.0 + */ + public function setIconSvgInline(string $iconSvgInline): TemplateFileCreator { + $this->iconSvgInline = $iconSvgInline; + return $this; + } + + /** * @since 21.0.0 */ public function addMimetype(string $mimetype): TemplateFileCreator { @@ -128,7 +139,7 @@ final class TemplateFileCreator implements \JsonSerializable { /** * @since 21.0.0 - * @return array{app: string, label: string, extension: string, iconClass: ?string, mimetypes: string[], ratio: ?float, actionLabel: string} + * @return array{app: string, label: string, extension: string, iconClass: ?string, iconSvgInline: ?string, mimetypes: string[], ratio: ?float, actionLabel: string} */ public function jsonSerialize(): array { return [ @@ -136,6 +147,7 @@ final class TemplateFileCreator implements \JsonSerializable { 'label' => $this->actionName, 'extension' => $this->fileExtension, 'iconClass' => $this->iconClass, + 'iconSvgInline' => $this->iconSvgInline, 'mimetypes' => $this->mimetypes, 'ratio' => $this->ratio, 'actionLabel' => $this->actionLabel, |