@@ -27,55 +27,55 @@ |
||
| 27 | 27 | |
| 28 | 28 | class Application extends \OCP\AppFramework\App { |
| 29 | 29 | |
| 30 | - public function __construct() { |
|
| 31 | - parent::__construct('workflowengine'); |
|
| 30 | + public function __construct() { |
|
| 31 | + parent::__construct('workflowengine'); |
|
| 32 | 32 | |
| 33 | - $this->getContainer()->registerAlias('FlowOperationsController', FlowOperations::class); |
|
| 34 | - $this->getContainer()->registerAlias('RequestTimeController', RequestTime::class); |
|
| 35 | - } |
|
| 33 | + $this->getContainer()->registerAlias('FlowOperationsController', FlowOperations::class); |
|
| 34 | + $this->getContainer()->registerAlias('RequestTimeController', RequestTime::class); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * Register all hooks and listeners |
|
| 39 | - */ |
|
| 40 | - public function registerHooksAndListeners() { |
|
| 41 | - $dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); |
|
| 42 | - $dispatcher->addListener( |
|
| 43 | - 'OCP\WorkflowEngine::loadAdditionalSettingScripts', |
|
| 44 | - function() { |
|
| 45 | - if (!function_exists('style')) { |
|
| 46 | - // This is hacky, but we need to load the template class |
|
| 47 | - class_exists(Template::class, true); |
|
| 48 | - } |
|
| 37 | + /** |
|
| 38 | + * Register all hooks and listeners |
|
| 39 | + */ |
|
| 40 | + public function registerHooksAndListeners() { |
|
| 41 | + $dispatcher = $this->getContainer()->getServer()->getEventDispatcher(); |
|
| 42 | + $dispatcher->addListener( |
|
| 43 | + 'OCP\WorkflowEngine::loadAdditionalSettingScripts', |
|
| 44 | + function() { |
|
| 45 | + if (!function_exists('style')) { |
|
| 46 | + // This is hacky, but we need to load the template class |
|
| 47 | + class_exists(Template::class, true); |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - style('workflowengine', [ |
|
| 51 | - 'admin', |
|
| 52 | - ]); |
|
| 50 | + style('workflowengine', [ |
|
| 51 | + 'admin', |
|
| 52 | + ]); |
|
| 53 | 53 | |
| 54 | - script('core', [ |
|
| 55 | - 'files/fileinfo', |
|
| 56 | - 'files/client', |
|
| 57 | - 'systemtags/systemtags', |
|
| 58 | - 'systemtags/systemtagmodel', |
|
| 59 | - 'systemtags/systemtagscollection', |
|
| 60 | - ]); |
|
| 54 | + script('core', [ |
|
| 55 | + 'files/fileinfo', |
|
| 56 | + 'files/client', |
|
| 57 | + 'systemtags/systemtags', |
|
| 58 | + 'systemtags/systemtagmodel', |
|
| 59 | + 'systemtags/systemtagscollection', |
|
| 60 | + ]); |
|
| 61 | 61 | |
| 62 | - script('workflowengine', [ |
|
| 63 | - 'admin', |
|
| 64 | - 'templates', |
|
| 62 | + script('workflowengine', [ |
|
| 63 | + 'admin', |
|
| 64 | + 'templates', |
|
| 65 | 65 | |
| 66 | - // Check plugins |
|
| 67 | - 'filemimetypeplugin', |
|
| 68 | - 'filenameplugin', |
|
| 69 | - 'filesizeplugin', |
|
| 70 | - 'filesystemtagsplugin', |
|
| 71 | - 'requestremoteaddressplugin', |
|
| 72 | - 'requesttimeplugin', |
|
| 73 | - 'requesturlplugin', |
|
| 74 | - 'requestuseragentplugin', |
|
| 75 | - 'usergroupmembershipplugin', |
|
| 76 | - ]); |
|
| 77 | - }, |
|
| 78 | - -100 |
|
| 79 | - ); |
|
| 80 | - } |
|
| 66 | + // Check plugins |
|
| 67 | + 'filemimetypeplugin', |
|
| 68 | + 'filenameplugin', |
|
| 69 | + 'filesizeplugin', |
|
| 70 | + 'filesystemtagsplugin', |
|
| 71 | + 'requestremoteaddressplugin', |
|
| 72 | + 'requesttimeplugin', |
|
| 73 | + 'requesturlplugin', |
|
| 74 | + 'requestuseragentplugin', |
|
| 75 | + 'usergroupmembershipplugin', |
|
| 76 | + ]); |
|
| 77 | + }, |
|
| 78 | + -100 |
|
| 79 | + ); |
|
| 80 | + } |
|
| 81 | 81 | } |