Skip to content

Commit

Permalink
Revert usage of formElementManager(BC break)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielss89 committed Dec 21, 2015
1 parent c524269 commit 9f54582
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
5 changes: 5 additions & 0 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 0 additions & 8 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions src/ZfcUser/Controller/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ZfcUser/Factory/View/Helper/ZfcUserLoginWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 9f54582

Please sign in to comment.