-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathUJMExoBundle.php
More file actions
61 lines (50 loc) · 1.97 KB
/
UJMExoBundle.php
File metadata and controls
61 lines (50 loc) · 1.97 KB
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
<?php
namespace UJM\ExoBundle;
use Claroline\CoreBundle\Library\PluginBundle;
use Claroline\KernelBundle\Bundle\ConfigurationBuilder;
use Claroline\KernelBundle\Bundle\ConfigurationProviderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use UJM\ExoBundle\DependencyInjection\Compiler\QuestionHandlerPass;
use UJM\ExoBundle\Installation\AdditionalInstaller;
class UJMExoBundle extends PluginBundle implements ConfigurationProviderInterface
{
public function getContainerExtension()
{
return new DependencyInjection\UJMExoExtension();
}
public function getConfiguration($environment)
{
$config = new ConfigurationBuilder();
return $config->addRoutingResource(__DIR__.'/Resources/config/routing.yml', null, 'exercise');
}
public function getRequiredFixturesDirectory($environment)
{
return 'DataFixtures';
}
public function suggestConfigurationFor(Bundle $bundle, $environment)
{
$emptyConfigs = [
'Innova\AngularJSBundle\InnovaAngularJSBundle',
'Innova\AngularUIBootstrapBundle\InnovaAngularUIBootstrapBundle',
'Innova\AngularUITranslationBundle\InnovaAngularUITranslationBundle',
'Innova\AngularUIResourcePickerBundle\InnovaAngularUIResourcePickerBundle',
'Innova\AngularUITinyMCEBundle\InnovaAngularUITinyMCEBundle',
'Innova\AngularUIPageslideBundle\InnovaAngularUIPageslideBundle',
'Innova\AngularUISortableBundle\AngularUISortableBundle',
];
if (in_array(get_class($bundle), $emptyConfigs)) {
return new ConfigurationBuilder();
}
return false;
}
public function getAdditionalInstaller()
{
return new AdditionalInstaller();
}
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new QuestionHandlerPass());
}
}