2019-08-07 05:01:09 -04:00
|
|
|
<?php
|
2020-04-09 05:50:14 -04:00
|
|
|
|
2019-08-07 05:01:09 -04:00
|
|
|
declare(strict_types=1);
|
2021-06-04 15:52:51 -04:00
|
|
|
|
2019-08-07 05:01:09 -04:00
|
|
|
/**
|
2024-05-30 14:13:41 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-08-07 05:01:09 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCA\WorkflowEngine\Controller;
|
|
|
|
|
|
2019-08-19 11:13:47 -04:00
|
|
|
use OCA\WorkflowEngine\Helper\ScopeContext;
|
|
|
|
|
use OCP\WorkflowEngine\IManager;
|
2019-08-07 05:01:09 -04:00
|
|
|
|
2019-08-19 11:13:47 -04:00
|
|
|
class GlobalWorkflowsController extends AWorkflowController {
|
2019-08-07 05:01:09 -04:00
|
|
|
|
2019-08-19 11:13:47 -04:00
|
|
|
/** @var ScopeContext */
|
|
|
|
|
private $scopeContext;
|
2019-08-07 05:01:09 -04:00
|
|
|
|
2019-08-19 11:13:47 -04:00
|
|
|
protected function getScopeContext(): ScopeContext {
|
2020-04-10 08:19:56 -04:00
|
|
|
if ($this->scopeContext === null) {
|
2019-08-19 11:13:47 -04:00
|
|
|
$this->scopeContext = new ScopeContext(IManager::SCOPE_ADMIN);
|
2019-08-07 05:01:09 -04:00
|
|
|
}
|
2019-08-19 11:13:47 -04:00
|
|
|
return $this->scopeContext;
|
2019-08-07 05:01:09 -04:00
|
|
|
}
|
|
|
|
|
}
|