aboutsummaryrefslogtreecommitdiffstats
path: root/apps/admin_audit/lib/Actions/TagManagement.php
blob: a167017aec390dad0c3509a50339c84d21187542 (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
<?php

declare(strict_types=1);

/*!
 * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCA\AdminAudit\Actions;

use OCP\SystemTag\ISystemTag;

class TagManagement extends Action {
	/**
	 * @param ISystemTag $tag newly created tag
	 */
	public function createTag(ISystemTag $tag): void {
		$this->log('System tag "%s" (%s, %s) created',
			[
				'name' => $tag->getName(),
				'visbility' => $tag->isUserVisible() ? 'visible' : 'invisible',
				'assignable' => $tag->isUserAssignable() ? 'user assignable' : 'system only',
			],
			['name', 'visibility', 'assignable']
		);
	}
}