1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the Stinger Soft Platform package. |
5
|
|
|
* |
6
|
|
|
* (c) Oliver Kotte <[email protected]> |
7
|
|
|
* (c) Florian Meyer <[email protected]> |
8
|
|
|
* |
9
|
|
|
* For the full copyright and license information, please view the LICENSE |
10
|
|
|
* file that was distributed with this source code. |
11
|
|
|
*/ |
12
|
|
|
namespace StingerSoft\PlatformBundle; |
13
|
|
|
|
14
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
15
|
|
|
|
16
|
|
|
class StingerSoftPlatformBundle extends Bundle { |
17
|
|
|
|
18
|
|
|
public static function getRequiredBundles($env) { |
19
|
|
|
$bundles = []; |
20
|
|
|
$bundles['FrameworkBundle'] = '\Symfony\Bundle\FrameworkBundle\FrameworkBundle'; |
21
|
|
|
$bundles['SecurityBundle'] = '\Symfony\Bundle\SecurityBundle\SecurityBundle'; |
22
|
|
|
$bundles['TwigBundle'] = '\Symfony\Bundle\TwigBundle\TwigBundle'; |
23
|
|
|
$bundles['MonologBundle'] = '\Symfony\Bundle\MonologBundle\MonologBundle'; |
24
|
|
|
$bundles['AsseticBundle'] = '\Symfony\Bundle\AsseticBundle\AsseticBundle'; |
25
|
|
|
$bundles['SwiftmailerBundle'] = '\Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle'; |
26
|
|
|
$bundles['DoctrineBundle'] = '\Doctrine\Bundle\DoctrineBundle\DoctrineBundle'; |
27
|
|
|
$bundles['DoctrineFixturesBundle'] = '\Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle'; |
28
|
|
|
$bundles['SensioFrameworkExtraBundle'] = '\Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle'; |
29
|
|
|
$bundles['DoctrineBehaviorsBundle'] = '\Knp\DoctrineBehaviors\Bundle\DoctrineBehaviorsBundle'; |
30
|
|
|
$bundles['BmatznerFontAwesomeBundle'] = '\Bmatzner\FontAwesomeBundle\BmatznerFontAwesomeBundle'; |
31
|
|
|
$bundles['BmatznerJQueryBundle'] = '\Bmatzner\JQueryBundle\BmatznerJQueryBundle'; |
32
|
|
|
$bundles['KnpPaginatorBundle'] = '\Knp\Bundle\PaginatorBundle\KnpPaginatorBundle'; |
33
|
|
|
|
34
|
|
|
$bundles['StingerSoftPlatformBundle'] = '\StingerSoft\PlatformBundle\StingerSoftPlatformBundle'; |
35
|
|
|
|
36
|
|
|
if(in_array($env, [ |
37
|
|
|
'dev', |
38
|
|
|
'test' |
39
|
|
|
], true)) { |
40
|
|
|
$bundles['DebugBundle'] = '\Symfony\Bundle\DebugBundle\DebugBundle'; |
41
|
|
|
$bundles['WebProfilerBundle'] = '\Symfony\Bundle\WebProfilerBundle\WebProfilerBundle'; |
42
|
|
|
$bundles['SensioDistributionBundle'] = '\Sensio\Bundle\DistributionBundle\SensioDistributionBundle'; |
43
|
|
|
$bundles['SensioGeneratorBundle'] = '\Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle'; |
44
|
|
|
} |
45
|
|
|
return $bundles; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
|
49
|
|
|
public static function initBundles(array $bundles){ |
50
|
|
|
$result = []; |
51
|
|
|
foreach($bundles as $bundle){ |
52
|
|
|
$result[] = new $bundle; |
53
|
|
|
} |
54
|
|
|
return $result; |
55
|
|
|
} |
56
|
|
|
} |
57
|
|
|
|