fix(api): Add alias to Field

Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
This commit is contained in:
Elizabeth Danzberger 2024-07-16 15:54:31 -04:00 committed by Julius Härtl
parent 6cd83fc96a
commit 8ac706a520
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF

View file

@ -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,
];