From 8ac706a520952fbfa5a8e665861d8ec924272acd Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Tue, 16 Jul 2024 15:54:31 -0400 Subject: [PATCH] fix(api): Add alias to `Field` Signed-off-by: Elizabeth Danzberger --- lib/public/Files/Template/Field.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/public/Files/Template/Field.php b/lib/public/Files/Template/Field.php index c86a623f980..ea200b74a00 100644 --- a/lib/public/Files/Template/Field.php +++ b/lib/public/Files/Template/Field.php @@ -7,17 +7,17 @@ namespace OCP\Files\Template; -use OCP\Files\Template\InvalidFieldTypeException; - class Field implements \JsonSerializable { private string $index; private string $content; private FieldType $type; + private ?string $alias; private ?int $id; private ?string $tag; - public function __construct($index, $content, $type, $id = null, $tag = null) { + public function __construct($index, $content, $type, $alias = null, $id = null, $tag = null) { $this->index = $index; + $this->alias = $alias; $this->id = $id; $this->tag = $tag; $this->content = $content; @@ -34,6 +34,7 @@ class Field implements \JsonSerializable { "index" => $this->index, "content" => $this->content, "type" => $this->type->value, + "alias" => $this->alias, "id" => $this->id, "tag" => $this->tag, ]; -- 2.39.5