diff --git a/Module.php b/Module.php index aba23da4..06cc21c5 100644 --- a/Module.php +++ b/Module.php @@ -71,6 +71,11 @@ public function getServiceConfig() 'ZfcUser\Authentication\Storage\Db' => 'ZfcUser\Authentication\Storage\Db', 'zfcuser_user_service' => 'ZfcUser\Service\User', 'zfcuser_register_form_hydrator' => 'Zend\Stdlib\Hydrator\ClassMethods', + + 'zfcuser_login_form' => 'ZfcUser\Factory\Form\Login', + 'zfcuser_register_form' => 'ZfcUser\Factory\Form\Register', + 'zfcuser_change_password_form' => 'ZfcUser\Factory\Form\ChangePassword', + 'zfcuser_change_email_form' => 'ZfcUser\Factory\Form\ChangeEmail', ), 'factories' => array( 'zfcuser_redirect_callback' => 'ZfcUser\Factory\Controller\RedirectCallbackFactory', diff --git a/config/module.config.php b/config/module.config.php index a40176b9..e8f022d1 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -6,14 +6,6 @@ 'zfcuser' => __DIR__ . '/../view', ), ), - 'form_elements' => array( - 'factories' => array( - 'zfcuser_login_form' => 'ZfcUser\Factory\Form\Login', - 'zfcuser_register_form' => 'ZfcUser\Factory\Form\Register', - 'zfcuser_change_password_form' => 'ZfcUser\Factory\Form\ChangePassword', - 'zfcuser_change_email_form' => 'ZfcUser\Factory\Form\ChangeEmail', - ) - ), 'router' => array( 'routes' => array( diff --git a/src/ZfcUser/Controller/UserController.php b/src/ZfcUser/Controller/UserController.php index 06dc9fed..e9bbd143 100644 --- a/src/ZfcUser/Controller/UserController.php +++ b/src/ZfcUser/Controller/UserController.php @@ -362,7 +362,7 @@ public function setUserService(UserService $userService) public function getRegisterForm() { if (!$this->registerForm) { - $this->setRegisterForm($this->getServiceLocator()->get('FormElementManager')->get('zfcuser_register_form')); + $this->setRegisterForm($this->getServiceLocator()->get('zfcuser_register_form')); } return $this->registerForm; } @@ -375,7 +375,7 @@ public function setRegisterForm(FormInterface$registerForm) public function getLoginForm() { if (!$this->loginForm) { - $this->setLoginForm($this->getServiceLocator()->get('FormElementManager')->get('zfcuser_login_form')); + $this->setLoginForm($this->getServiceLocator()->get('zfcuser_login_form')); } return $this->loginForm; } @@ -395,7 +395,7 @@ public function setLoginForm(FormInterface $loginForm) public function getChangePasswordForm() { if (!$this->changePasswordForm) { - $this->setChangePasswordForm($this->getServiceLocator()->get('FormElementManager')->get('zfcuser_change_password_form')); + $this->setChangePasswordForm($this->getServiceLocator()->get('zfcuser_change_password_form')); } return $this->changePasswordForm; } @@ -438,7 +438,7 @@ public function getOptions() public function getChangeEmailForm() { if (!$this->changeEmailForm) { - $this->setChangeEmailForm($this->getServiceLocator()->get('FormElementManager')->get('zfcuser_change_email_form')); + $this->setChangeEmailForm($this->getServiceLocator()->get('zfcuser_change_email_form')); } return $this->changeEmailForm; } diff --git a/src/ZfcUser/Factory/View/Helper/ZfcUserLoginWidget.php b/src/ZfcUser/Factory/View/Helper/ZfcUserLoginWidget.php index 96f2cc87..7d02db62 100644 --- a/src/ZfcUser/Factory/View/Helper/ZfcUserLoginWidget.php +++ b/src/ZfcUser/Factory/View/Helper/ZfcUserLoginWidget.php @@ -26,7 +26,7 @@ public function createService(ServiceLocatorInterface $serviceManager) $locator = $serviceManager->getServiceLocator(); $viewHelper = new View\Helper\ZfcUserLoginWidget; $viewHelper->setViewTemplate($locator->get('zfcuser_module_options')->getUserLoginWidgetViewTemplate()); - $viewHelper->setLoginForm($locator->get('FormElementManager')->get('zfcuser_login_form')); + $viewHelper->setLoginForm($locator->get('zfcuser_login_form')); return $viewHelper; } }