-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.php
More file actions
48 lines (36 loc) · 1.18 KB
/
controller.php
File metadata and controls
48 lines (36 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
namespace Concrete\Package\MdClearEmptyWorkflow;
use Concrete\Core\Command\Task\Manager as TaskManager;
use Concrete\Core\Package\Package;
use Macareux\ClearEmptyWorkflow\Task\Controller\ClearEmptyWorkflowController;
class Controller extends Package
{
protected $appVersionRequired = '9.0.0';
protected $pkgHandle = 'md_clear_empty_workflow';
protected $pkgVersion = '0.0.1';
protected $pkgAutoloaderRegistries = [
'src' => '\Macareux\ClearEmptyWorkflow',
];
public function getPackageName()
{
return t('Macareux Clear Empty Workflow');
}
public function getPackageDescription()
{
return t('Install a task to remove annoying workflow notifications you can not approve or deny.');
}
public function install()
{
$pkg = parent::install();
$this->installContentFile('install/tasks.xml');
return $pkg;
}
public function on_start()
{
/** @var TaskManager $taskManager */
$taskManager = $this->app->make(TaskManager::class);
$taskManager->extend('clear_empty_workflow', function () {
return app(ClearEmptyWorkflowController::class);
});
}
}