0
0
mirror of https://github.com/nextcloud/server.git synced 2024-12-29 16:38:28 +00:00
nextcloud_server/lib/public/Files/Template/FileCreatedFromTemplateEvent.php
Elizabeth Danzberger efe03ee690
feat: Add support for filling fields to backend components
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
2024-07-25 11:11:40 +02:00

57 lines
1017 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\Files\Template;
use OCP\EventDispatcher\Event;
use OCP\Files\File;
/**
* @since 21.0.0
*/
class FileCreatedFromTemplateEvent extends Event {
private $template;
private $target;
private $templateFields;
/**
* @param File|null $template
* @param File $target
* @since 21.0.0
*/
public function __construct(?File $template, File $target, array $templateFields) {
$this->template = $template;
$this->target = $target;
$this->templateFields = $templateFields;
}
/**
* @return File|null
* @since 21.0.0
*/
public function getTemplate(): ?File {
return $this->template;
}
/**
* @return array
* @since 30.0.0
*/
public function getTemplateFields(): array {
return $this->templateFields;
}
/**
* @return File
* @since 21.0.0
*/
public function getTarget(): File {
return $this->target;
}
}