-
Notifications
You must be signed in to change notification settings - Fork 3
/
Plugin.php
45 lines (38 loc) · 1.45 KB
/
Plugin.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
<?php
declare(strict_types=1);
namespace Oneup\Contao\SentryBundle\ContaoManager;
use Contao\CoreBundle\ContaoCoreBundle;
use Contao\ManagerPlugin\Bundle\BundlePluginInterface;
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;
use Contao\ManagerPlugin\Config\ConfigPluginInterface;
use Contao\ManagerPlugin\Dependency\DependentPluginInterface;
use Oneup\Contao\SentryBundle\OneupContaoSentryBundle;
use Sentry\SentryBundle\SentryBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
class Plugin implements BundlePluginInterface, ConfigPluginInterface, DependentPluginInterface
{
public function getBundles(ParserInterface $parser): array
{
return [
// load SentryBundle (dependency)
BundleConfig::create(SentryBundle::class)->setLoadAfter([ContaoCoreBundle::class]),
// load OneupContaoSentryBundle
BundleConfig::create(OneupContaoSentryBundle::class)->setLoadAfter([
ContaoCoreBundle::class,
SentryBundle::class,
]),
];
}
public function registerContainerConfiguration(LoaderInterface $loader, array $managerConfig): void
{
// load default config from SentryBundle
$loader->load('@SentryBundle/Resources/config/services.xml');
}
public function getPackageDependencies(): array
{
return [
'sentry/sentry-symfony',
];
}
}