aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/App/Events/AppEnableEvent.php
blob: fe1523d6a834f4727ae9aa644110e0d01609bfc1 (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
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OCP\App\Events;

use OCP\EventDispatcher\Event;

/**
 * This event is triggered when an app is enabled.
 *
 * @since 27.0.0
 */
class AppEnableEvent extends Event {
	private string $appId;
	/** @var string[] */
	private array $groupIds;

	/**
	 * @param string[] $groupIds
	 * @since 27.0.0
	 */
	public function __construct(string $appId, array $groupIds = []) {
		parent::__construct();

		$this->appId = $appId;
		$this->groupIds = $groupIds;
	}

	/**
	 * @since 27.0.0
	 */
	public function getAppId(): string {
		return $this->appId;
	}

	/**
	 * @since 27.0.0
	 */
	public function getGroupIds(): array {
		return $this->groupIds;
	}
}