-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* NC20 IBootStrap, LoggerInterface, * Cover RegisterFlowOperationsListener * Add tests * Use PSR-3 ContainerInterface * Include autoload.php inside of Application * Lint fix * Exception serialization (see nextcloud/server#21875)
- Loading branch information
Showing
22 changed files
with
473 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ vendor | |
.php_cs.cache | ||
coverage*.xml | ||
coverage*.html | ||
coverage_html | ||
build | ||
.phpunit.result.cache | ||
*.cov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
<summary>OCR processing via workflow</summary> | ||
<description>This app makes it possible to process various files via OCR algorithms. | ||
The processing is done via workflow-engine and can therefore easily be customized.</description> | ||
<version>1.19.1</version> | ||
<version>1.20.0</version> | ||
<licence>agpl</licence> | ||
<author mail="[email protected]">Robin Windey</author> | ||
<namespace>WorkflowOcr</namespace> | ||
|
@@ -22,6 +22,6 @@ | |
<repository type="git">https://github.com/R0Wi/workflow_ocr.git</repository> | ||
<screenshot>https://github.com/R0Wi/workflow_ocr/blob/eb2d65e9610406bbab22c4c8dda1cea015b5c791/doc/img/usage_1.jpg?raw=true</screenshot> | ||
<dependencies> | ||
<nextcloud min-version="19" max-version="19" /> | ||
<nextcloud min-version="20" max-version="20" /> | ||
</dependencies> | ||
</info> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* @copyright Copyright (c) 2020 Robin Windey <[email protected]> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace OCA\WorkflowOcr\Listener; | ||
|
||
use OCA\WorkflowOcr\AppInfo\Application; | ||
use OCA\WorkflowOcr\Operation; | ||
use OCP\EventDispatcher\Event; | ||
use OCP\EventDispatcher\IEventListener; | ||
use OCP\Util; | ||
use OCP\WorkflowEngine\Events\RegisterOperationsEvent; | ||
use Psr\Container\ContainerInterface; | ||
|
||
class RegisterFlowOperationsListener implements IEventListener { | ||
|
||
/** @var ContainerInterface */ | ||
private $container; | ||
|
||
public function __construct(ContainerInterface $container) { | ||
$this->container = $container; | ||
} | ||
|
||
public function handle(Event $event): void { | ||
if (!$event instanceof RegisterOperationsEvent) { | ||
return; | ||
} | ||
$event->registerOperation($this->container->get(Operation::class)); | ||
Util::addScript(Application::APP_NAME, 'admin'); | ||
} | ||
} |
Oops, something went wrong.