1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the core-bundle package. |
5
|
|
|
* |
6
|
|
|
* (c) 2018 WEBEWEB |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace WBW\Bundle\CoreBundle; |
13
|
|
|
|
14
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
15
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
16
|
|
|
use WBW\Bundle\CoreBundle\DependencyInjection\Compiler\ColorProviderCompilerPass; |
17
|
|
|
use WBW\Bundle\CoreBundle\Provider\AssetsProviderInterface; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* Core bundle. |
21
|
|
|
* |
22
|
|
|
* @author webeweb <https://github.com/webeweb/> |
23
|
|
|
* @package WBW\Bundle\CoreBundle |
24
|
|
|
*/ |
25
|
|
|
class CoreBundle extends Bundle implements AssetsProviderInterface { |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* Core "Danger". |
29
|
|
|
* |
30
|
|
|
* @var string |
31
|
|
|
* @deprecated since Core bundle 1.11.0, use {@see WBW\Bundle\CoreBundle\CoreInterface} instead. |
32
|
|
|
*/ |
33
|
|
|
const CORE_DANGER = CoreInterface::CORE_DANGER; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* Core "Info". |
37
|
|
|
* |
38
|
|
|
* @var string |
39
|
|
|
* @deprecated since Core bundle 1.11.0, use {@see WBW\Bundle\CoreBundle\CoreInterface} instead. |
40
|
|
|
*/ |
41
|
|
|
const CORE_INFO = CoreInterface::CORE_INFO; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* Core "Success". |
45
|
|
|
* |
46
|
|
|
* @var string |
47
|
|
|
* @deprecated since Core bundle 1.11.0, use {@see WBW\Bundle\CoreBundle\CoreInterface} instead. |
48
|
|
|
*/ |
49
|
|
|
const CORE_SUCCESS = CoreInterface::CORE_SUCCESS; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Core "Warning". |
53
|
|
|
* |
54
|
|
|
* @var string |
55
|
|
|
* @deprecated since Core bundle 1.11.0, use {@see WBW\Bundle\CoreBundle\CoreInterface} instead. |
56
|
|
|
*/ |
57
|
|
|
const CORE_WARNING = CoreInterface::CORE_WARNING; |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* {@inheritdoc} |
61
|
|
|
*/ |
62
|
|
|
public function build(ContainerBuilder $container) { |
63
|
|
|
$container->addCompilerPass(new ColorProviderCompilerPass()); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* {@inheritdoc} |
68
|
|
|
*/ |
69
|
|
|
public function getAssetsRelativeDirectory() { |
70
|
|
|
return "/Resources/assets"; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
/** |
74
|
|
|
* {@inheritDoc} |
75
|
|
|
*/ |
76
|
|
|
public function getContainerExtension() { |
77
|
|
|
return parent::getContainerExtension(); |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
|