-
Notifications
You must be signed in to change notification settings - Fork 9
/
CCDNComponentBBCodeBundle.php
59 lines (51 loc) · 1.5 KB
/
CCDNComponentBBCodeBundle.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
50
51
52
53
54
55
56
57
58
59
<?php
/*
* This file is part of the CCDNComponent BBCodeBundle
*
* (c) CCDN (c) CodeConsortium <http://www.codeconsortium.com/>
*
* Available on github <http://www.github.com/codeconsortium/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CCDNComponent\BBCodeBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use CCDNComponent\BBCodeBundle\DependencyInjection\Compiler\TagCompilerPass;
use CCDNComponent\BBCodeBundle\DependencyInjection\Compiler\ACLCompilerPass;
/**
*
* @author Reece Fowell <[email protected]>
* @version 1.0
*/
class CCDNComponentBBCodeBundle extends Bundle
{
/**
*
* @access public
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
*/
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->addCompilerPass(new TagCompilerPass());
$container->addCompilerPass(new ACLCompilerPass());
}
/**
*
* @access public
*/
public function boot()
{
$twig = $this->container->get('twig');
$twig->addGlobal(
'ccdn_component_bb_code',
array(
'editor' => array(
'enable' => $this->container->getParameter('ccdn_component_bb_code.editor.enable'),
),
)
); // End Twig Globals.
}
}