AppEnableEvent.php 813 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\App\Events;
  8. use OCP\EventDispatcher\Event;
  9. /**
  10. * This event is triggered when an app is enabled.
  11. *
  12. * @since 27.0.0
  13. */
  14. class AppEnableEvent extends Event {
  15. private string $appId;
  16. /** @var string[] */
  17. private array $groupIds;
  18. /**
  19. * @param string[] $groupIds
  20. * @since 27.0.0
  21. */
  22. public function __construct(string $appId, array $groupIds = []) {
  23. parent::__construct();
  24. $this->appId = $appId;
  25. $this->groupIds = $groupIds;
  26. }
  27. /**
  28. * @since 27.0.0
  29. */
  30. public function getAppId(): string {
  31. return $this->appId;
  32. }
  33. /**
  34. * @since 27.0.0
  35. */
  36. public function getGroupIds(): array {
  37. return $this->groupIds;
  38. }
  39. }