-
Notifications
You must be signed in to change notification settings - Fork 0
/
WorkflowExtendBundle.php
executable file
·75 lines (64 loc) · 1.75 KB
/
WorkflowExtendBundle.php
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* Studio1 Kommunikation GmbH
*
* This source file is available under following license:
* - GNU General Public License v3.0 (GNU GPLv3)
*
* @copyright Copyright (c) Studio1 Kommunikation GmbH (http://www.studio1.de)
* @license https://www.gnu.org/licenses/gpl-3.0.txt
*/
namespace Studio1\WorkflowExtendBundle;
use Pimcore\Extension\Bundle\AbstractPimcoreBundle;
class WorkflowExtendBundle extends AbstractPimcoreBundle
{
/**
* Check if PimcoreWorkflowDesignerBundle is installed
*
* @return bool
*/
private function isWorkflowDesignerBundleInstalled(): bool
{
$bundles = $this->container->getParameter('kernel.bundles');
return isset($bundles['PimcoreWorkflowDesignerBundle']);
}
/**
* @return array|\Pimcore\Routing\RouteReferenceInterface[]|string[]
*/
public function getJsPaths()
{
if (!$this->isWorkflowDesignerBundleInstalled()) {
return [];
}
return [
'/bundles/workflowextend/js/pimcore/configuration/item/transitionSettings.js',
'/bundles/workflowextend/js/pimcore/configuration/item/placeSettings.js',
];
}
/**
* @return string
*/
public function getDescription()
{
$description = 'This bundles extends pimcores workflow engine ';
if ($this->isWorkflowDesignerBundleInstalled()) {
$description .= 'and workflow designer ';
}
$description .= 'with additional features.';
return $description;
}
/**
* @return string
*/
public function getNiceName()
{
return 'Workflow Extend';
}
/**
* @return string
*/
public function getVersion()
{
return '1.1.0';
}
}