-
Notifications
You must be signed in to change notification settings - Fork 14
/
InnovaPathBundle.php
executable file
·49 lines (39 loc) · 1.29 KB
/
InnovaPathBundle.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
<?php
namespace Innova\PathBundle;
use Claroline\CoreBundle\Library\PluginBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Claroline\KernelBundle\Bundle\AutoConfigurableInterface;
use Claroline\KernelBundle\Bundle\ConfigurationProviderInterface;
use Claroline\KernelBundle\Bundle\ConfigurationBuilder;
use Innova\PathBundle\Installation\AdditionalInstaller;
/**
* Bundle class.
*/
class InnovaPathBundle extends PluginBundle implements AutoConfigurableInterface, ConfigurationProviderInterface
{
public function supports($environment)
{
return true;
}
public function getConfiguration($environment)
{
$config = new ConfigurationBuilder();
return $config->addRoutingResource(__DIR__ . '/Resources/config/routing.yml', null, 'innova_path');
}
public function suggestConfigurationFor(Bundle $bundle, $environment)
{
$bundleClass = get_class($bundle);
$config = new ConfigurationBuilder();
$emptyConfigs = array(
'Innova\AngularUIPageslideBundle\InnovaAngularUIPageslideBundle',
);
if (in_array($bundleClass, $emptyConfigs)) {
return $config;
}
return false;
}
public function getAdditionalInstaller()
{
return new AdditionalInstaller();
}
}