2024-07-05 12:47:01 -04:00
|
|
|
<?php
|
|
|
|
|
2024-07-24 19:47:14 -04:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2024-07-05 12:47:01 -04:00
|
|
|
/**
|
|
|
|
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OCP\Files\Template;
|
|
|
|
|
|
|
|
use OCP\EventDispatcher\Event;
|
|
|
|
|
2024-07-24 19:41:52 -04:00
|
|
|
/**
|
|
|
|
* @since 30.0.0
|
|
|
|
*/
|
2024-07-05 12:47:01 -04:00
|
|
|
class BeforeGetTemplatesEvent extends Event {
|
2024-07-24 19:41:52 -04:00
|
|
|
/** @var array<Template> */
|
2024-07-05 12:47:01 -04:00
|
|
|
private array $templates;
|
|
|
|
|
2024-07-24 19:41:52 -04:00
|
|
|
/**
|
|
|
|
* @param array<Template> $templates
|
2024-07-24 19:47:14 -04:00
|
|
|
*
|
2024-07-24 19:41:52 -04:00
|
|
|
* @since 30.0.0
|
|
|
|
*/
|
2024-07-05 12:47:01 -04:00
|
|
|
public function __construct(array $templates) {
|
|
|
|
parent::__construct();
|
|
|
|
|
|
|
|
$this->templates = $templates;
|
|
|
|
}
|
|
|
|
|
2024-07-24 19:41:52 -04:00
|
|
|
/**
|
|
|
|
* @return array<Template>
|
2024-07-24 19:47:14 -04:00
|
|
|
*
|
2024-07-24 19:41:52 -04:00
|
|
|
* @since 30.0.0
|
|
|
|
*/
|
2024-07-05 12:47:01 -04:00
|
|
|
public function getTemplates(): array {
|
|
|
|
return $this->templates;
|
|
|
|
}
|
|
|
|
}
|