# frozen_string_literal: true # Redmine - project management software # Copyright (C) 2006- Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class GroupCustomField < CustomField def type_name :label_group_plural end end ty-aws-diet Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/DirectEditing/ACreateEmpty.php
blob: f30cc2465f97ea37acb6120d66fb702e53372137 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
 * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCP\DirectEditing;

use OCP\Files\File;

/**
 * @since 18.0.0
 */
abstract class ACreateEmpty {
	/**
	 * Unique id for the creator to filter templates
	 *
	 * e.g. document/spreadsheet/presentation
	 *
	 * @since 18.0.0
	 * @return string
	 */
	abstract public function getId(): string;

	/**
	 * Descriptive name for the create action
	 *
	 * e.g Create a new document
	 *
	 * @since 18.0.0
	 * @return string
	 */
	abstract public function getName(): string;

	/**
	 * Default file extension for the new file
	 *
	 * @since 18.0.0
	 * @return string
	 */
	abstract public function getExtension(): string;

	/**
	 * Mimetype of the resulting created file
	 *
	 * @since 18.0.0
	 * @return string
	 */
	abstract public function getMimetype(): string;

	/**
	 * Add content when creating empty files
	 *
	 * @since 18.0.0
	 * @param File $file
	 */
	public function create(File $file, ?string $creatorId = null, ?string $templateId = null): void {
	}
}