-
Notifications
You must be signed in to change notification settings - Fork 1
/
LaurentBulletinBundle.php
44 lines (33 loc) · 1.1 KB
/
LaurentBulletinBundle.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
<?php
namespace Laurent\BulletinBundle;
use Claroline\CoreBundle\Library\PluginBundle;
use Claroline\KernelBundle\Bundle\ConfigurationBuilder;
use Claroline\KernelBundle\Bundle\ConfigurationProviderInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class LaurentBulletinBundle extends PluginBundle implements ConfigurationProviderInterface
{
public function getConfiguration($environment)
{
$config = new ConfigurationBuilder();
return $config->addRoutingResource(__DIR__.'/Resources/config/routing.yml', null,'bulletin');
}
public function hasMigrations()
{
return true;
}
public function getRequiredFixturesDirectory($env){
return 'DataFixtures/Required';
}
public function suggestConfigurationFor(Bundle $bundle, $environment)
{
$config = new ConfigurationBuilder();
$config
->addContainerResource($this->buildPath('knp_snappy'));
return $config;
}
private function buildPath($file, $folder = 'suggested')
{
return __DIR__ . "/Resources/config/{$folder}/{$file}.yml";
}
}
?>