Example #1
0
 protected function createComponentAccountForm()
 {
     $form = $this->accountForm->invoke();
     $form->setDefaults(array('routePrefix' => $this->administrationManager->routePrefix, 'defaultPresenter' => $this->administrationManager->defaultPresenter));
     $form->onSuccess[] = function (Form $form) {
         $form->getPresenter()->flashMessage($this->translator->translate('Account settings has been updated'), 'success');
         $form->getPresenter()->redirect('this');
     };
     return $form;
 }
Example #2
0
 protected function createComponentAccountForm()
 {
     if ($this->user->identity instanceof UserEntity) {
         $form = $this->securityManager->getUserTypeByClass($this->user->identity->class)->getFrontFormFactory()->invoke($this->extendedUser);
     } else {
         $form = $this->accountFormFactory->invoke();
     }
     $form->onSuccess[] = $this->accountFormSuccess;
     return $form;
 }
Example #3
0
 protected function createComponentSystemAccountForm()
 {
     $form = $this->accountForm->invoke();
     $form->onSuccess[] = $this->accountFormSuccess;
     return $form;
 }