1<?php 2 3declare(strict_types=1); 4 5/** 6 * @copyright Copyright (c) 2019 Arthur Schiwon <blizzz@arthur-schiwon.de> 7 * 8 * @author Arthur Schiwon <blizzz@arthur-schiwon.de> 9 * @author Christoph Wurst <christoph@winzerhof-wurst.at> 10 * 11 * @license GNU AGPL version 3 or any later version 12 * 13 * This program is free software: you can redistribute it and/or modify 14 * it under the terms of the GNU Affero General Public License as 15 * published by the Free Software Foundation, either version 3 of the 16 * License, or (at your option) any later version. 17 * 18 * This program is distributed in the hope that it will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 * GNU Affero General Public License for more details. 22 * 23 * You should have received a copy of the GNU Affero General Public License 24 * along with this program. If not, see <http://www.gnu.org/licenses/>. 25 * 26 */ 27namespace OCA\WorkflowEngine\Controller; 28 29use OCA\WorkflowEngine\Helper\ScopeContext; 30use OCP\WorkflowEngine\IManager; 31 32class GlobalWorkflowsController extends AWorkflowController { 33 34 /** @var ScopeContext */ 35 private $scopeContext; 36 37 protected function getScopeContext(): ScopeContext { 38 if ($this->scopeContext === null) { 39 $this->scopeContext = new ScopeContext(IManager::SCOPE_ADMIN); 40 } 41 return $this->scopeContext; 42 } 43} 44