GlobalWorkflowsController.php 592 B

12345678910111213141516171819202122232425
  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 OCA\WorkflowEngine\Controller;
  8. use OCA\WorkflowEngine\Helper\ScopeContext;
  9. use OCP\WorkflowEngine\IManager;
  10. class GlobalWorkflowsController extends AWorkflowController {
  11. /** @var ScopeContext */
  12. private $scopeContext;
  13. protected function getScopeContext(): ScopeContext {
  14. if ($this->scopeContext === null) {
  15. $this->scopeContext = new ScopeContext(IManager::SCOPE_ADMIN);
  16. }
  17. return $this->scopeContext;
  18. }
  19. }