Skip to content

Commit ba56348

Browse files
committed
fixup! files: Create files from template API
1 parent a899278 commit ba56348

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

lib/public/Files/Template/Template.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,42 @@
2828

2929
use OCP\Files\File;
3030

31+
/**
32+
* @since 21.0.0
33+
*/
3134
class Template implements \JsonSerializable {
3235
protected $templateType;
3336
protected $templateId;
3437
protected $file;
3538
protected $hasPreview = false;
3639
protected $previewUrl;
3740

41+
/**
42+
* @since 21.0.0
43+
*/
3844
final public function __construct(string $templateType, string $templateId, File $file) {
3945
$this->templateType = $templateType;
4046
$this->templateId = $templateId;
4147
$this->file = $file;
4248
}
4349

50+
/**
51+
* @since 21.0.0
52+
*/
4453
final public function setCustomPreviewUrl(string $previewUrl): void {
4554
$this->previewUrl = $previewUrl;
4655
}
4756

57+
/**
58+
* @since 21.0.0
59+
*/
4860
final public function setHasPreview(bool $hasPreview): void {
4961
$this->hasPreview = $hasPreview;
5062
}
5163

64+
/**
65+
* @since 21.0.0
66+
*/
5267
final public function jsonSerialize() {
5368
return [
5469
'templateType' => $this->templateType,

0 commit comments

Comments
 (0)