use OCP\EventDispatcher\Event;
+/**
+ * @since 30.0.0
+ */
class BeforeGetTemplatesEvent extends Event {
+ /** @var array<Template> */
private array $templates;
+ /**
+ * @param array<Template> $templates
+ *
+ * @since 30.0.0
+ */
public function __construct(array $templates) {
parent::__construct();
$this->templates = $templates;
}
+ /**
+ * @return array<Template>
+ *
+ * @since 30.0.0
+ */
public function getTemplates(): array {
return $this->templates;
}
namespace OCP\Files\Template;
+/**
+ * @since 30.0.0
+ */
class Field implements \JsonSerializable {
private string $index;
private string $content;
private ?int $id;
private ?string $tag;
+ /**
+ * @param string $index
+ * @param string $content
+ * @param FieldType $type
+ * @param ?string $alias
+ * @param ?int $id
+ * @param ?string $tag
+ *
+ * @since 30.0.0
+ */
public function __construct($index, $content, $type, $alias = null, $id = null, $tag = null) {
$this->index = $index;
$this->alias = $alias;
}
}
+ /**
+ * @return array
+ *
+ * @since 30.0.0
+ */
public function jsonSerialize(): array {
return [
"index" => $this->index,
namespace OCP\Files\Template;
+/**
+ * @since 30.0.0
+ */
enum FieldType: string {
case RichText = "rich-text";
case CheckBox = "checkbox";