Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
20 | public function createService(ServiceLocatorInterface $formElementManager) |
||
21 | { |
||
22 | /** @var FormElementManager $formElementManager */ |
||
23 | $fem = $formElementManager; |
||
24 | $sm = $formElementManager->getServiceLocator(); |
||
25 | /** @var AuthenticationOptionsInterface $options */ |
||
26 | $options = $sm->get('zfcuser_module_options'); |
||
27 | $form = new Form\ChangeEmail(null, $options); |
||
28 | // Inject the FormElementManager to support custom FormElements |
||
29 | $form->getFormFactory()->setFormElementManager($fem); |
||
30 | |||
31 | $form->setInputFilter(new Form\ChangeEmailFilter( |
||
32 | $options, |
||
33 | new Validator\NoRecordExists(array( |
||
34 | 'mapper' => $sm->get('zfcuser_user_mapper'), |
||
35 | 'key' => 'email' |
||
36 | )) |
||
37 | )); |
||
38 | |||
39 | return $form; |
||
40 | } |
||
41 | } |
||
42 |