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; }
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; }
protected function createComponentSystemAccountForm() { $form = $this->accountForm->invoke(); $form->onSuccess[] = $this->accountFormSuccess; return $form; }