-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathCCDNUserUserBundle.php
161 lines (153 loc) · 7.94 KB
/
CCDNUserUserBundle.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?php
/*
* This file is part of the CCDNUser UserBundle
*
* (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\UserBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
*
* @category CCDNUser
* @package UserBundle
*
* @author Reece Fowell <[email protected]>
* @license http://opensource.org/licenses/MIT MIT
* @version Release: 1.0
* @link https://github.com/codeconsortium/CCDNUserUserBundle
*
*/
class CCDNUserUserBundle extends Bundle
{
/**
*
* @access public
* @return string
*/
public function getParent()
{
return 'FOSUserBundle';
}
// public function build(ContainerBuilder $container)
// {
// parent::build($container);
//
// if (false === $container->hasDefinition('doctrine.orm.listeners.resolve_target_entity')) {
// return;
// }
//
// $definition = $container->getDefinition('doctrine.orm.listeners.resolve_target_entity');
//
// //$taggedServices = $container->findTaggedServiceIds('doctrine.event_listener');
// $targetEntites = array(
// '\Symfony\Component\Security\Core\User\UserInterface' => 'CCDNUser\UserBundle\Entity\User'
// );
//
// foreach ($argetEntities as $name => $implementation) {
// $definition->addMethodCall('addResolveTargetEntity', array($name, $implementation, array()));
// }
// }
/**
*
* @access public
*/
public function boot()
{
$twig = $this->container->get('twig');
$twig->addGlobal(
'ccdn_user_user',
array(
'seo' => array(
'title_length' => $this->container->getParameter('ccdn_user_user.seo.title_length'),
),
'legal' => array(
'terms_conditions' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.legal.terms_conditions.layout_template'),
'document' => $this->container->getParameter('ccdn_user_user.legal.terms_conditions.document'),
),
'copyright_notice' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.legal.copyright_notice.layout_template'),
'document' => $this->container->getParameter('ccdn_user_user.legal.copyright_notice.document'),
),
'privacy_policy' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.legal.privacy_policy.layout_template'),
'document' => $this->container->getParameter('ccdn_user_user.legal.privacy_policy.document'),
),
'disclaimer' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.legal.disclaimer.layout_template'),
'document' => $this->container->getParameter('ccdn_user_user.legal.disclaimer.document'),
),
),
'legal_identification' => array(
'company_name' => $this->container->getParameter('ccdn_user_user.legal_identification.company_name'),
'company_address' => $this->container->getParameter('ccdn_user_user.legal_identification.company_address'),
'company_registered_number' => $this->container->getParameter('ccdn_user_user.legal_identification.company_registered_number'),
'company_registered_house' => $this->container->getParameter('ccdn_user_user.legal_identification.company_registered_house'),
'copyright_year' => $this->container->getParameter('ccdn_user_user.legal_identification.copyright_year'),
'show_company_name' => $this->container->getParameter('ccdn_user_user.legal_identification.show_company_name'),
'show_company_address' => $this->container->getParameter('ccdn_user_user.legal_identification.show_company_address'),
'show_company_registered_number' => $this->container->getParameter('ccdn_user_user.legal_identification.show_company_registered_number'),
'show_company_registered_house' => $this->container->getParameter('ccdn_user_user.legal_identification.show_company_registered_house'),
'show_copyright_year' => $this->container->getParameter('ccdn_user_user.legal_identification.show_copyright_year'),
),
'registration' => array(
'register' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.registration.register.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_user_user.registration.register.form_theme'),
),
'terms' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.registration.terms.layout_template'),
),
'check_email' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.registration.check_email.layout_template'),
),
'confirmed' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.registration.confirmed.layout_template'),
),
),
'security' => array(
'login' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.security.login.layout_template'),
'support_facebook' => $this->container->getParameter('ccdn_user_user.security.login.support_facebook'),
),
),
'resetting' => array(
'request' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.resetting.request.layout_template'),
),
'check_email' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.resetting.check_email.layout_template'),
),
'password_already_requested' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.resetting.password_already_requested.layout_template'),
),
'reset' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.resetting.reset.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_user_user.resetting.reset.form_theme'),
),
),
'account' => array(
'show' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.account.show.layout_template'),
),
'edit' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.account.edit.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_user_user.account.edit.form_theme'),
),
),
'password' => array(
'change_password' => array(
'layout_template' => $this->container->getParameter('ccdn_user_user.password.change_password.layout_template'),
'form_theme' => $this->container->getParameter('ccdn_user_user.password.change_password.form_theme'),
),
),
)
); // End Twig Globals.
}
}