forked from codeconsortium/CCDNUserAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CCDNUserAdminBundle.php
80 lines (75 loc) · 3.41 KB
/
CCDNUserAdminBundle.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
/*
* This file is part of the CCDNUser AdminBundle
*
* (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 CCDNUser\AdminBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
*
* @category CCDNUser
* @package AdminBundle
*
* @author Reece Fowell <reece@codeconsortium.com>
* @license http://opensource.org/licenses/MIT MIT
* @version Release: 2.0
* @link https://github.com/codeconsortium/CCDNUserAdminBundle
*
*/
class CCDNUserAdminBundle extends Bundle
{
/**
*
* @access public
*/
public function boot()
{
$twig = $this->container->get('twig');
$twig->addGlobal(
'ccdn_user_admin',
array(
'seo' => array(
'title_length' => $this->container->getParameter('ccdn_user_admin.seo.title_length'),
),
'activation' => array(
'show_unactivated_users' => array(
'layout_template' => $this->container->getParameter('ccdn_user_admin.activation.show_unactivated_users.layout_template'),
'member_since_datetime_format' => $this->container->getParameter('ccdn_user_admin.activation.show_unactivated_users.member_since_datetime_format'),
),
),
'ban' => array(
'show_banned_users' => array(
'layout_template' => $this->container->getParameter('ccdn_user_admin.ban.show_banned_users.layout_template'),
'member_since_datetime_format' => $this->container->getParameter('ccdn_user_admin.ban.show_banned_users.member_since_datetime_format'),
),
),
'account' => array(
'show_newest_users' => array(
'layout_template' => $this->container->getParameter('ccdn_user_admin.account.show_newest_users.layout_template'),
'member_since_datetime_format' => $this->container->getParameter('ccdn_user_admin.account.show_newest_users.member_since_datetime_format'),
),
'show_user' => array(
'layout_template' => $this->container->getParameter('ccdn_user_admin.account.show_user.layout_template'),
'member_since_datetime_format' => $this->container->getParameter('ccdn_user_admin.account.show_user.member_since_datetime_format'),
),
'edit_user_account' => array(
'layout_template' => $this->container->getParameter('ccdn_user_admin.account.edit_user_account.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_user_admin.account.edit_user_account.form_theme'),
),
),
'role' => array(
'set_users_role' => array(
'layout_template' => $this->container->getParameter('ccdn_user_admin.role.set_users_role.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_user_admin.role.set_users_role.form_theme'),
),
),
)
); // End Twig Globals.
}
}