You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ce module étend ZfcUser qui permet de nombreuses fonctionnalités liées à la gestion d'un compte client.
9
9
10
-
Le fonctionnalités apportées par AdfabUser sont :
10
+
Le fonctionnalités apportées par PgUser sont :
11
11
* Gestion des autorisations via BjyAuthorize
12
12
* Mot de passe oublié
13
13
* Activation de compte par mail
@@ -27,7 +27,7 @@ La commande php doctrine-module.php orm:schema-tool:create permet d'installer le
27
27
28
28
La commande php doctrine-module.php data-fixture:import --append permet d'installer les rôles 'user' et 'admin' ainsi que l'utilisateur 'admin@test.com' (mot de passe 'admin') avec les droits d'administration.
29
29
30
-
#Extending AdfabUser
30
+
#Extending PgUser
31
31
## Use your own User entity
32
32
If you want to use your own entity :
33
33
@@ -53,11 +53,11 @@ If you want to use your own entity :
53
53
)
54
54
),
55
55
56
-
3. Create your entity (using the doctrine annotation) in your Module. You'll have to implement the interface AdfabUser\Entity\UserInterface (see below for the explanation)
56
+
3. Create your entity (using the doctrine annotation) in your Module. You'll have to implement the interface PgUser\Entity\UserInterface (see below for the explanation)
57
57
58
-
class User implements \AdfabUser\Entity\UserInterface, ProviderInterface, InputFilterAwareInterface
58
+
class User implements \PgUser\Entity\UserInterface, ProviderInterface, InputFilterAwareInterface
59
59
60
-
4. The entities of other Adfab modules which need to link AdfabUser entity base the relationship on an interface : AdfabUser\Entity\UserInterface. So that, in case you extend the User entity, you can replace this relationship easily. To be able to do that, your user entity needs to implement AdfabUser\Entity\UserInterface.
60
+
4. The entities of other Adfab modules which need to link PgUser entity base the relationship on an interface : PgUser\Entity\UserInterface. So that, in case you extend the User entity, you can replace this relationship easily. To be able to do that, your user entity needs to implement PgUser\Entity\UserInterface.
61
61
And in your Module.php onBootstrap method, You have then to use the doctrine listener feature to replace the interface with the correct class
62
62
63
63
public function onBootstrap($e)
@@ -68,7 +68,7 @@ And in your Module.php onBootstrap method, You have then to use the doctrine lis
68
68
69
69
$listener = new \Doctrine\ORM\Tools\ResolveTargetEntityListener();
70
70
$listener->addResolveTargetEntity(
71
-
'AdfabUser\Entity\UserInterface',
71
+
'PgUser\Entity\UserInterface',
72
72
'MyUser\Entity\User',
73
73
array()
74
74
);
@@ -80,11 +80,11 @@ And in your Module.php onBootstrap method, You have then to use the doctrine lis
80
80
## Use your own Form
81
81
If you want to change the ChangeInfo Form for example (ie. you want to add a 'children' select list to persist in your user database table). First extend the entity as explained previously. Then :
82
82
83
-
1. Create the Form class in your Module, which extends the AdfabUser Form
83
+
1. Create the Form class in your Module, which extends the PgUser Form
84
84
85
-
class ChangeInfo extends \AdfabUser\Form\ChangeInfo
85
+
class ChangeInfo extends \PgUser\Form\ChangeInfo
86
86
87
-
If you want to use the default fields of the AdfabUser Form, you can do this by using the parent constructor
87
+
If you want to use the default fields of the PgUser Form, you can do this by using the parent constructor
2. Declare your Form in your Module.php factories definition by reusing the same form name used in AdfabUser (as your module is loaded after AdfabUser, your definition will be taken instead of the AdfabUser definition)
111
+
2. Declare your Form in your Module.php factories definition by reusing the same form name used in PgUser (as your module is loaded after PgUser, your definition will be taken instead of the PgUser definition)
112
112
113
113
public function getServiceConfig()
114
114
{
115
115
return array(
116
116
'factories' => array(
117
-
'adfabuser_change_info_form' => function($sm) {
117
+
'pguser_change_info_form' => function($sm) {
118
118
$translator = $sm->get('MvcTranslator');
119
-
$options = $sm->get('adfabuser_module_options');
119
+
$options = $sm->get('pguser_module_options');
120
120
$form = new Form\ChangeInfo(null, $options, $translator);
121
121
return $form;
122
122
},
@@ -127,9 +127,9 @@ If you want to change the ChangeInfo Form for example (ie. you want to add a 'ch
127
127
## Use your own User controller
128
128
If you want to add an action or modify an existing one.
129
129
130
-
1. Create the controller in your Module (extend the AdfabUser one if you want to use its methods)
130
+
1. Create the controller in your Module (extend the PgUser one if you want to use its methods)
131
131
132
-
class UserController extends \AdfabUser\Controller\Frontend\UserController
132
+
class UserController extends \PgUser\Controller\Frontend\UserController
133
133
{
134
134
public function profileAction ()
135
135
{
@@ -172,7 +172,7 @@ If you want to add an action or modify an existing one.
0 commit comments