RegisterEntitiesEvent.php 677 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\WorkflowEngine\Events;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\WorkflowEngine\IEntity;
  10. use OCP\WorkflowEngine\IManager;
  11. /**
  12. * @since 18.0.0
  13. */
  14. class RegisterEntitiesEvent extends Event {
  15. /** @var IManager */
  16. private $manager;
  17. /**
  18. * @since 18.0.0
  19. */
  20. public function __construct(IManager $manager) {
  21. parent::__construct();
  22. $this->manager = $manager;
  23. }
  24. /**
  25. * @since 18.0.0
  26. */
  27. public function registerEntity(IEntity $entity): void {
  28. $this->manager->registerEntity($entity);
  29. }
  30. }