IConditionalWidget.php 572 B

1234567891011121314151617181920212223242526
  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\Dashboard;
  8. /**
  9. * interface IConditionalWidget
  10. *
  11. * Allows an app to lazy-register a widget and in the lazy part of the code
  12. * it can decide if the widget should really be registered.
  13. *
  14. * @since 26.0.0
  15. */
  16. interface IConditionalWidget extends IWidget {
  17. /**
  18. * @return bool Whether the widget is enabled and should be registered
  19. * @since 26.0.0
  20. */
  21. public function isEnabled(): bool;
  22. }