2022-12-08 04:55:19 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2022-12-08 04:55:19 -05:00
|
|
|
*/
|
|
|
|
|
namespace OCP\App\Events;
|
|
|
|
|
|
|
|
|
|
use OCP\EventDispatcher\Event;
|
|
|
|
|
|
|
|
|
|
/**
|
2024-07-23 12:49:26 -04:00
|
|
|
* This event is triggered when an app is enabled.
|
|
|
|
|
*
|
2022-12-08 04:55:19 -05:00
|
|
|
* @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;
|
|
|
|
|
}
|
|
|
|
|
}
|